@melaya/runner 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browserBridge.js +11 -0
- package/package.json +1 -1
package/dist/browserBridge.js
CHANGED
|
@@ -948,6 +948,17 @@ export async function startBrowserBridge(opts) {
|
|
|
948
948
|
stopWatchLease(sessionId);
|
|
949
949
|
return;
|
|
950
950
|
}
|
|
951
|
+
// Idempotent: the trusted UI re-affirms the watch on a heartbeat (every few
|
|
952
|
+
// seconds) and on every reconnect, so browser:watch active=true arrives
|
|
953
|
+
// repeatedly for the SAME session. Restarting the producer each time churned
|
|
954
|
+
// the capture loop and spammed the log. If a producer is already running for
|
|
955
|
+
// this session, just refresh the delivery params and keep the existing loop.
|
|
956
|
+
const existingLease = watchLeases.get(sessionId);
|
|
957
|
+
if (existingLease && existingLease.active) {
|
|
958
|
+
existingLease.framePostUrl = framePostUrl;
|
|
959
|
+
existingLease.runAuthHeader = runAuthHeader;
|
|
960
|
+
return;
|
|
961
|
+
}
|
|
951
962
|
// Find which runId corresponds to this sessionId.
|
|
952
963
|
// Priority order:
|
|
953
964
|
// 1. Interactive session: sessionId is both the key in interactiveSessions
|