restart ws process if already running with different version

This commit is contained in:
Tommy D. Rossi
2025-12-21 16:48:07 +01:00
parent ba8096fd74
commit 6809ebea72
9 changed files with 239 additions and 117 deletions
+2
View File
@@ -328,6 +328,7 @@ function onDebuggerDetach(source: chrome.debugger.Debuggee, reason: `${chrome.de
})
if (reason === chrome.debugger.DetachReason.CANCELED_BY_USER) {
// Chrome's debugger info bar cancellation detaches ALL debugger sessions, not just one tab
store.setState({ connectionState: 'disconnected', errorText: undefined })
}
}
@@ -451,6 +452,7 @@ function handleConnectionClose(reason: string, code: number): void {
if (reason === 'Extension Replaced' || code === 4001) {
logger.debug('Connection replaced by another extension instance')
store.setState({
tabs: new Map(),
connectionState: 'error',
errorText: 'Disconnected: Replaced by another extension',
})