Skip to content

Commit 49b234a

Browse files
committed
remove use of _acceptNewConnections in WebSocketDebugService
1 parent 32f165e commit 49b234a

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

dwds/lib/src/services/debug_service.dart

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -441,16 +441,6 @@ class WebSocketDebugService implements IDebugService {
441441
WebSocketProxyService webSocketProxyService,
442442
) {
443443
return webSocketHandler((WebSocketChannel webSocket) {
444-
if (!_acceptNewConnections) {
445-
webSocket.sink.add(
446-
jsonEncode({
447-
'error': 'Cannot connect: another service has taken control.',
448-
}),
449-
);
450-
webSocket.sink.close();
451-
return;
452-
}
453-
454444
final responseController = StreamController<Map<String, Object?>>();
455445
webSocket.sink.addStream(responseController.stream.map(jsonEncode));
456446

@@ -473,9 +463,6 @@ class WebSocketDebugService implements IDebugService {
473463
webSocketProxyService,
474464
).done.whenComplete(() {
475465
--_clientsConnected;
476-
if (!_acceptNewConnections && _clientsConnected == 0) {
477-
_acceptNewConnections = true;
478-
}
479466
});
480467
});
481468
}

0 commit comments

Comments
 (0)