mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix(browser): preserve debugger attachment across relay disconnects during navigation reattach
This commit is contained in:
committed by
Peter Steinberger
parent
18cd77c8ce
commit
04b3a51d3a
@@ -807,19 +807,21 @@ async function onDebuggerDetach(source, reason) {
|
||||
return
|
||||
}
|
||||
|
||||
if (!relayWs || relayWs.readyState !== WebSocket.OPEN) {
|
||||
reattachPending.delete(tabId)
|
||||
setBadge(tabId, 'error')
|
||||
void chrome.action.setTitle({
|
||||
tabId,
|
||||
title: 'OpenClaw Browser Relay: relay disconnected during re-attach',
|
||||
})
|
||||
return
|
||||
}
|
||||
const relayUp = relayWs && relayWs.readyState === WebSocket.OPEN
|
||||
|
||||
try {
|
||||
await attachTab(tabId)
|
||||
// When relay is down, still attach the debugger but skip sending the
|
||||
// relay event. reannounceAttachedTabs() will notify the relay once it
|
||||
// reconnects, so the tab stays tracked across transient relay drops.
|
||||
await attachTab(tabId, { skipAttachedEvent: !relayUp })
|
||||
reattachPending.delete(tabId)
|
||||
if (!relayUp) {
|
||||
setBadge(tabId, 'connecting')
|
||||
void chrome.action.setTitle({
|
||||
tabId,
|
||||
title: 'OpenClaw Browser Relay: attached, waiting for relay reconnect…',
|
||||
})
|
||||
}
|
||||
return
|
||||
} catch {
|
||||
// continue retries
|
||||
|
||||
Reference in New Issue
Block a user