Skip to content

Commit

Permalink
Fix little problem of profile switching
Browse files Browse the repository at this point in the history
  • Loading branch information
wyzdot authored and Max Lv committed Dec 24, 2020
1 parent 099dde0 commit 1bb482e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/com/github/shadowsocks/bg/BaseService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ object BaseService {
fun forceLoad() {
val (profile, fallback) = Core.currentProfile
?: return stopRunner(false, (this as Context).getString(R.string.profile_empty))
if (profile.host.isEmpty() || profile.password.isEmpty() ||
fallback != null && (fallback.host.isEmpty() || fallback.password.isEmpty())) {
if (profile.host.isEmpty() || (!profile.method.equals("none") && profile.password.isEmpty()) ||
fallback != null && (fallback.host.isEmpty() || (!fallback.method.equals("none") && fallback.password.isEmpty()))) {
stopRunner(false, (this as Context).getString(R.string.proxy_empty))
return
}
Expand Down

0 comments on commit 1bb482e

Please sign in to comment.