@@ -49,7 +49,7 @@ func (m *ProverManager) Get(userKey string) (ret *proverSession) {
4949 if err != nil {
5050 log .Error ("Get persistent layer for prover tokens fail" , "error" , err )
5151 } else if ret != nil {
52- log .Debug ("restore record from persistent" , "key" , userKey , "token" , ret . proverToken )
52+ log .Debug ("restore record from persistent" , "key" , userKey )
5353 ret .persistent = m .persistent
5454 }
5555 }
@@ -161,8 +161,8 @@ func (c *proverSession) maintainLogin(ctx context.Context, cliMgr Client, up str
161161 return
162162 }
163163
164- if resp .ErrCode == ctypes .ErrJWTTokenExpired {
165- log .Info ("up stream has expired, renew upstream connection" , "up" , up )
164+ if resp .ErrCode == ctypes .ErrJWTTokenExpired || resp . ErrCode == ctypes . ErrJWTCommonErr {
165+ log .Info ("up stream has expired, renew upstream connection" , "up" , up , "errcode" , resp . ErrCode )
166166 cli .Reset ()
167167 cli = cliMgr .ClientAsProxy (ctx )
168168 if cli == nil {
@@ -231,9 +231,10 @@ func (c *proverSession) GetTask(ctx context.Context, param *types.GetTaskParamet
231231 if err != nil {
232232 return nil , err
233233 }
234- if resp .ErrCode != ctypes .ErrJWTTokenExpired {
234+ if resp .ErrCode != ctypes .ErrJWTTokenExpired && resp . ErrCode != ctypes . ErrJWTCommonErr {
235235 return resp , nil
236236 }
237+ log .Debug ("Get Task first-try failed for broken token" , "up" , up , "errcode" , resp .ErrCode )
237238 }
238239
239240 // like SDK, we would try one more time if the upstream token is expired
@@ -264,9 +265,10 @@ func (c *proverSession) SubmitProof(ctx context.Context, param *types.SubmitProo
264265 if err != nil {
265266 return nil , err
266267 }
267- if resp .ErrCode != ctypes .ErrJWTTokenExpired {
268+ if resp .ErrCode != ctypes .ErrJWTTokenExpired && resp . ErrCode != ctypes . ErrJWTCommonErr {
268269 return resp , nil
269270 }
271+ log .Debug ("Get Task first-try failed for broken token" , "up" , up , "errcode" , resp .ErrCode )
270272 }
271273
272274 // like SDK, we would try one more time if the upstream token is expired
0 commit comments