Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/robot/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ export class RobotClient extends EventDispatcher implements Robot {

this.currentRetryAttempt = attemptNumber;

// Always retry the next attempt
return true;
// Always retry the next attempt if not closed
return !this.closed;
},
};

Expand Down Expand Up @@ -634,8 +634,10 @@ export class RobotClient extends EventDispatcher implements Robot {

this.currentRetryAttempt = attemptNumber;

// Abort reconnects if the the caller specifies, otherwise retry
return !conf.reconnectAbortSignal?.abort;
const aborted = conf.reconnectAbortSignal?.abort ?? false;

// Retry if not closed or aborted
return !aborted && !this.closed;
},
};

Expand Down