File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const _pauseIsolatesOnStartFlag = 'pause_isolates_on_start';
3131/// Grace period before destroying isolate when no clients are detected.
3232/// This handles the race condition during page refresh where the old connection
3333/// closes before the new connection is established, preventing premature isolate destruction.
34- const _isolateDestructionGracePeriod = Duration (seconds: 2 );
34+ const _isolateDestructionGracePeriod = Duration (seconds: 10 );
3535
3636/// Tracks hot reload responses from multiple browser windows/tabs.
3737class _HotReloadTracker {
@@ -292,8 +292,14 @@ class WebSocketProxyService extends ProxyService {
292292 // Double-check client count again before destroying
293293 final finalClientCount = sendClientRequest ({'type' : 'ping' });
294294 if (finalClientCount == 0 ) {
295+ _logger.fine (
296+ 'Final check confirmed no clients, destroying isolate' ,
297+ );
295298 destroyIsolate ();
296299 } else {
300+ _logger.fine (
301+ 'Final check found $finalClientCount clients, keeping isolate alive' ,
302+ );
297303 _activeConnectionCount = finalClientCount;
298304 }
299305 });
You can’t perform that action at this time.
0 commit comments