Skip to content

Commit

Permalink
fix(net): not check error when internet check failed
Browse files Browse the repository at this point in the history
  • Loading branch information
fdkevin0 committed Dec 9, 2021
1 parent 0df572f commit cf58782
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/net/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ var loginCmd = &cobra.Command{
//检测是否能访问互联网,如果不能,则退出登录并尝试重新登录
if !portalServer.Internet() {
log.Println("internet is not available, try to login again")
_, err := portalServer.PortalLogout()
cobra.CheckErr(err)
if _, err := portalServer.PortalLogout(); err != nil {
log.Println(err)
}
break
}

Expand Down

0 comments on commit cf58782

Please sign in to comment.