Skip to content

Commit

Permalink
fix: online judgement
Browse files Browse the repository at this point in the history
fixed #44
  • Loading branch information
Mmx233 committed Nov 2, 2024
1 parent e4193b4 commit 33c7e93
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/srun/srun.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ func (c Srun) LoginStatus() (online *bool, ip *string, err error) {
errRes, ok := res["error"]
if ok {
isOnlineStr, ok := errRes.(string)
if ok && isOnlineStr == "ok" {
online = &ok
if ok {
isOnline := isOnlineStr == "ok"
online = &isOnline
}
}

Expand Down

0 comments on commit 33c7e93

Please sign in to comment.