Skip to content

Commit

Permalink
change server time response check (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sagleft authored Sep 2, 2023
1 parent 0298136 commit 17b0129
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ func (c *Client) SyncServerTime() error {
return fmt.Errorf("get server time: %w", err)
}

if r.RetMsg != "OK" {
return fmt.Errorf("get server time: %s", r.RetMsg)
if r.Result.TimeNano == "" {
return errors.New("server time is empty")
}

return c.updateSyncTimeDelta(r.Result.TimeNano, time.Now().UnixNano())
Expand Down

0 comments on commit 17b0129

Please sign in to comment.