Skip to content

Commit

Permalink
chore: cancel connection attempt when removing connection, update ass…
Browse files Browse the repository at this point in the history
…ert to expect in webview and connection controller tests (#667)
  • Loading branch information
Anemy authored Jan 18, 2024
1 parent b2e6cb2 commit c6e7633
Show file tree
Hide file tree
Showing 3 changed files with 400 additions and 559 deletions.
7 changes: 7 additions & 0 deletions src/connectionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,13 @@ export default class ConnectionController {
}

async removeSavedConnection(connectionId: string): Promise<void> {
if (
this._connectionAttempt &&
connectionId === this._connectingConnectionId
) {
this.cancelConnectionAttempt();
}

delete this._connections[connectionId];

await this._connectionStorage.removeConnection(connectionId);
Expand Down
Loading

0 comments on commit c6e7633

Please sign in to comment.