Skip to content

Commit

Permalink
fix: logic of entering detect ip
Browse files Browse the repository at this point in the history
  • Loading branch information
Mmx233 committed Oct 26, 2024
1 parent ab0eb1a commit d5b6350
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/login/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,14 @@ func doLogin(conf SingleConf) error {
isClientIpRequired := !config.Meta.DoubleStack || config.Settings.DDNS.Enable
online, ip, err := srunClient.LoginStatus()
if err != nil {
if isClientIpRequired && online != nil {
if online == nil {
return err
} else if isClientIpRequired {
logger.Debugln("响应体缺失客户端 ip,尝试从页面匹配")
clientIp, err = srunDetector.DetectIp()
if err != nil {
return err
}
} else {
return err
}
} else {
clientIp = *ip
Expand Down

0 comments on commit d5b6350

Please sign in to comment.