Skip to content

Commit 1bb482e

Browse files
cyber386Max Lv
authored andcommitted
Fix little problem of profile switching
1 parent 099dde0 commit 1bb482e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/java/com/github/shadowsocks/bg/BaseService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ object BaseService {
224224
fun forceLoad() {
225225
val (profile, fallback) = Core.currentProfile
226226
?: return stopRunner(false, (this as Context).getString(R.string.profile_empty))
227-
if (profile.host.isEmpty() || profile.password.isEmpty() ||
228-
fallback != null && (fallback.host.isEmpty() || fallback.password.isEmpty())) {
227+
if (profile.host.isEmpty() || (!profile.method.equals("none") && profile.password.isEmpty()) ||
228+
fallback != null && (fallback.host.isEmpty() || (!fallback.method.equals("none") && fallback.password.isEmpty()))) {
229229
stopRunner(false, (this as Context).getString(R.string.proxy_empty))
230230
return
231231
}

0 commit comments

Comments
 (0)