fix(189pc): InvalidSessionKey (fix #920)

pull/984/head
Xhofe 2022-04-20 15:16:30 +08:00
parent c276a1541f
commit 6612338fc1
1 changed files with 7 additions and 0 deletions

View File

@ -291,6 +291,13 @@ func (s *State) Request(method string, fullUrl string, params Params, callback f
return nil, fmt.Errorf(erron.Msg)
}
if erron.ErrorCode != "" {
switch erron.ErrorCode {
case "InvalidSessionKey":
if err := s.RefreshSession(account); err != nil {
return nil, err
}
return s.Request(method, fullUrl, params, callback, account)
}
return nil, fmt.Errorf(erron.ErrorMsg)
}