Skip to content

Commit

Permalink
fix: online judgement
Browse files Browse the repository at this point in the history
  • Loading branch information
Mmx233 committed Nov 2, 2024
1 parent e4193b4 commit fee4451
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/srun/srun.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ 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 {
var isOnline bool
if isOnlineStr == "ok" {
isOnline = true
}
online = &isOnline
}
}

Expand Down

0 comments on commit fee4451

Please sign in to comment.