chore(extension): propagate errors to the client (#736)

This commit is contained in:
Yury Semikhatsky 2025-07-22 13:13:27 -07:00 committed by GitHub
parent 468c84eb8f
commit 70862ce456
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 71 additions and 85 deletions

View file

@ -59,7 +59,6 @@ class TabShareExtension {
});
const connection = new RelayConnection(socket);
connection.setConnectedTabId(tabId);
const connectionClosed = (m: string) => {
debugLog(m);
if (this._activeConnection === connection) {
@ -71,6 +70,7 @@ class TabShareExtension {
socket.onerror = error => connectionClosed(`WebSocket error: ${error}`);
this._activeConnection = connection;
connection.setConnectedTabId(tabId);
await this._setConnectedTabId(tabId);
debugLog(`Tab ${tabId} connected successfully`);
} catch (error: any) {