From 6612338fc1554f0075c2a002e793d48233421882 Mon Sep 17 00:00:00 2001 From: Xhofe Date: Wed, 20 Apr 2022 15:16:30 +0800 Subject: [PATCH] fix(189pc): InvalidSessionKey (fix #920) --- drivers/189pc/189.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/189pc/189.go b/drivers/189pc/189.go index a22f51be..b6f72f6b 100644 --- a/drivers/189pc/189.go +++ b/drivers/189pc/189.go @@ -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) }