File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -326,8 +326,8 @@ export class RobotClient extends EventDispatcher implements Robot {
326
326
327
327
this . currentRetryAttempt = attemptNumber ;
328
328
329
- // Always retry the next attempt
330
- return true ;
329
+ // Always retry the next attempt if not closed
330
+ return ! this . closed ;
331
331
} ,
332
332
} ;
333
333
@@ -568,8 +568,10 @@ export class RobotClient extends EventDispatcher implements Robot {
568
568
569
569
this . currentRetryAttempt = attemptNumber ;
570
570
571
- // Abort reconnects if the the caller specifies, otherwise retry
572
- return ! conf . reconnectAbortSignal ?. abort ;
571
+ const aborted = conf . reconnectAbortSignal ?. abort ?? false ;
572
+
573
+ // Retry if not closed or aborted
574
+ return ! aborted && ! this . closed ;
573
575
} ,
574
576
} ;
575
577
You can’t perform that action at this time.
0 commit comments