Index: sdk/lib/io/websocket_impl.dart |
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart |
index a1a2308086c6b1285640cad870da482bcca5a002..52587ed0306ac45ac6785fc993e6dd343bbc512b 100644 |
--- a/sdk/lib/io/websocket_impl.dart |
+++ b/sdk/lib/io/websocket_impl.dart |
@@ -277,11 +277,7 @@ class _WebSocketProtocolTransformer extends StreamEventTransformer { |
sink.add(_buffer.toString()); |
break; |
case _WebSocketMessageType.BINARY: |
- if (_buffer.length == 0) { |
- sink.add(const []); |
- } else { |
- sink.add(_buffer.readBytes(_buffer.length)); |
- } |
+ sink.add(_buffer.readBytes()); |
break; |
} |
_buffer = null; |