Index: sdk/lib/io/websocket_impl.dart |
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart |
index f85ddf28829331feb98637ff2befba7a91872e24..3a57c39ce8238cfd948a155ee4ce59889034672a 100644 |
--- a/sdk/lib/io/websocket_impl.dart |
+++ b/sdk/lib/io/websocket_impl.dart |
@@ -866,7 +866,8 @@ class _WebSocketImpl extends Stream implements WebSocket { |
_outCloseReason = reason; |
_writeClosed = true; |
} |
- return _sink.close(); |
+ if (!_sink._isBound) _sink.close(); |
+ return _sink.done; |
} |
static bool _isReservedStatusCode(int code) { |