Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Unified Diff: sdk/lib/io/websocket_impl.dart

Issue 23507003: Fix piping to a WebSocket (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {
« no previous file with comments | « no previous file | tests/standalone/io/web_socket_pipe_test.dart » ('j') | tests/standalone/io/web_socket_pipe_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698