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';
31
31
/// Grace period before destroying isolate when no clients are detected.
32
32
/// This handles the race condition during page refresh where the old connection
33
33
/// closes before the new connection is established, preventing premature isolate destruction.
34
- const _isolateDestructionGracePeriod = Duration (seconds: 2 );
34
+ const _isolateDestructionGracePeriod = Duration (seconds: 10 );
35
35
36
36
/// Tracks hot reload responses from multiple browser windows/tabs.
37
37
class _HotReloadTracker {
@@ -292,8 +292,14 @@ class WebSocketProxyService extends ProxyService {
292
292
// Double-check client count again before destroying
293
293
final finalClientCount = sendClientRequest ({'type' : 'ping' });
294
294
if (finalClientCount == 0 ) {
295
+ _logger.fine (
296
+ 'Final check confirmed no clients, destroying isolate' ,
297
+ );
295
298
destroyIsolate ();
296
299
} else {
300
+ _logger.fine (
301
+ 'Final check found $finalClientCount clients, keeping isolate alive' ,
302
+ );
297
303
_activeConnectionCount = finalClientCount;
298
304
}
299
305
});
You can’t perform that action at this time.
0 commit comments