Skip to content

Commit 8174b83

Browse files
committed
Update close_local_server.dart
1 parent 721fe6f commit 8174b83

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkgs/web_socket_conformance_tests/lib/src/close_local_server.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ void hybridMain(StreamChannel<Object?> channel) async {
2020
webSocket.listen((event) {
2121
print('Got event: $event');
2222
// channel.sink.add(event);
23+
}, onError: (e) {
24+
print('onError($e)');
2325
}, onDone: () {
2426
print('Server got ${webSocket.closeCode} ${webSocket.closeReason}');
2527
webSocket.close(4123, 'server closed the connection');
@@ -31,5 +33,6 @@ void hybridMain(StreamChannel<Object?> channel) async {
3133
channel.sink.add(server.port);
3234
await channel
3335
.stream.first; // Any writes indicates that the server should exit.
36+
print('>>>> exiting server');
3437
unawaited(server.close());
3538
}

0 commit comments

Comments
 (0)