assign token only if success

This commit is contained in:
aynakeya
2024-04-08 00:49:29 -07:00
parent 92b96841e2
commit 6565ab4176

View File

@@ -95,8 +95,8 @@ func (c *Client) init() error {
for _, h := range info.Data.HostList {
c.hostList = append(c.hostList, h.Host)
}
c.token = info.Data.Token
}
c.token = info.Data.Token
}
return nil
}