channel-worker 2.2.5 → 2.2.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/lib/command-poller.js +3 -11
- package/package.json +1 -1
package/lib/command-poller.js
CHANGED
|
@@ -1323,17 +1323,9 @@ class CommandPoller {
|
|
|
1323
1323
|
const lastActivity = this._profileLastActivity[profileId]
|
|
1324
1324
|
|| (name && this._profileLastActivity[name])
|
|
1325
1325
|
|| 0;
|
|
1326
|
-
//
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
const cmdCount = name ? await this.api.rendererHasCommands(name) : 0;
|
|
1330
|
-
if (cmdCount > 0) continue; // has work, skip
|
|
1331
|
-
} catch {}
|
|
1332
|
-
// No commands + not tracked = orphaned, close
|
|
1333
|
-
console.log(`[profile-timeout] Closing orphaned profile ${browser.name || profileId} (not tracked, no commands)`);
|
|
1334
|
-
try { await this.nst.stopProfile(profileId); } catch {}
|
|
1335
|
-
continue;
|
|
1336
|
-
}
|
|
1326
|
+
// Only close profiles that daemon has launched (tracked in _profileLastActivity).
|
|
1327
|
+
// User-launched profiles have no tracking entry — leave them alone.
|
|
1328
|
+
if (!lastActivity) continue;
|
|
1337
1329
|
if ((now - lastActivity) > IDLE_TIMEOUT) {
|
|
1338
1330
|
console.log(`[profile-timeout] Closing idle profile ${browser.name || profileId} (idle ${Math.round((now - lastActivity) / 1000)}s)`);
|
|
1339
1331
|
try {
|