mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
[io/unix-domain-sockets] Ensure that receiver closes received socket.
Leaving socket unclosed results in server still running, test timing out. This is follow-up to https://dart.googlesource.com/sdk/+/935ee25f3b72e7fe81047220cadae1f61c505da4 Fixes https://github.com/dart-lang/sdk/issues/47415 TEST=unix_socket_test on dartk bots Change-Id: Ic99cd382059b42b36c84bc1bce3441cc2fd3bd46 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216061 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Alexander Aprelev <aam@google.com>
This commit is contained in:
parent
3cb2d38723
commit
47f9067cad
2 changed files with 2 additions and 0 deletions
|
@ -697,6 +697,7 @@ Future testSocketMessage(String uniqueName) async {
|
|||
final receivedSocket = handles[0].toRawSocket();
|
||||
receivedSocket.write('Hello, server!\n'.codeUnits);
|
||||
socket.write('server replied'.codeUnits);
|
||||
receivedSocket.close();
|
||||
break;
|
||||
case RawSocketEvent.readClosed:
|
||||
socket.close();
|
||||
|
|
|
@ -693,6 +693,7 @@ Future testSocketMessage(String uniqueName) async {
|
|||
final receivedSocket = handles[0].toRawSocket();
|
||||
receivedSocket.write('Hello, server!\n'.codeUnits);
|
||||
socket.write('server replied'.codeUnits);
|
||||
receivedSocket.close();
|
||||
break;
|
||||
case RawSocketEvent.readClosed:
|
||||
socket.close();
|
||||
|
|
Loading…
Reference in a new issue