mirror of
https://github.com/smittix/intercept.git
synced 2026-04-25 07:10:00 -07:00
Don't stop agent scans when switching agents
When switching between agents in the UI, only stop the UI polling - don't send a stop command to the agent. Agent scans should continue running independently. When switching back, checkScanStatus() will detect the running scan and resume polling.
This commit is contained in:
@@ -1380,9 +1380,19 @@ const WiFiMode = (function() {
|
||||
|
||||
console.log('[WiFiMode] Agent changed from', lastAgentId, 'to', currentAgentId);
|
||||
|
||||
// Stop any running scan
|
||||
// Stop UI polling only - don't stop the actual scan on the agent
|
||||
// The agent should continue running independently
|
||||
if (isScanning) {
|
||||
stopScan();
|
||||
stopAgentDeepScanPolling();
|
||||
if (pollTimer) {
|
||||
clearInterval(pollTimer);
|
||||
pollTimer = null;
|
||||
}
|
||||
if (eventSource) {
|
||||
eventSource.close();
|
||||
eventSource = null;
|
||||
}
|
||||
setScanning(false);
|
||||
}
|
||||
|
||||
// Clear existing data when switching agents (unless "Show All" is enabled)
|
||||
|
||||
Reference in New Issue
Block a user