Index: sdk/lib/io/websocket_impl.dart |
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart |
index 2d29a5f658dd1c0dee32a68a58f14b5a3840ba23..bd21220f69830e9179419dd6ce6a5421bf7d9652 100644 |
--- a/sdk/lib/io/websocket_impl.dart |
+++ b/sdk/lib/io/websocket_impl.dart |
@@ -683,9 +683,9 @@ class _WebSocketImpl extends Stream implements WebSocket { |
} |
assert(index == headerSize); |
try { |
- _socket.writeBytes(header); |
+ _socket.add(header); |
if (data != null) { |
- _socket.writeBytes(data); |
+ _socket.add(data); |
} |
} catch (_) { |
// The socket can be closed before _socket.done have a chance |