Index: sdk/lib/io/websocket_impl.dart |
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart |
index 77c3456f5f604a727fd3017cddd93a65908d50e8..45ef839c2f5db795efbc8f9a228c7377b3ae8121 100644 |
--- a/sdk/lib/io/websocket_impl.dart |
+++ b/sdk/lib/io/websocket_impl.dart |
@@ -93,7 +93,7 @@ class _WebSocketProtocolTransformer extends StreamEventTransformer { |
throw new WebSocketException("Protocol error"); |
} |
_currentMessageType = _WebSocketMessageType.TEXT; |
- _controller = new StreamController(); |
+ _controller = new StreamController(sync: true); |
_controller.stream |
.transform(new Utf8DecoderTransformer(null)) |
.fold(new StringBuffer(), (buffer, str) => buffer..write(str)) |
@@ -109,7 +109,7 @@ class _WebSocketProtocolTransformer extends StreamEventTransformer { |
throw new WebSocketException("Protocol error"); |
} |
_currentMessageType = _WebSocketMessageType.BINARY; |
- _controller = new StreamController(); |
+ _controller = new StreamController(sync: true); |
_controller.stream |
.fold(new _BufferList(), (buffer, data) => buffer..add(data)) |
.then((buffer) { |
@@ -376,7 +376,7 @@ class _WebSocketPong { |
class _WebSocketTransformerImpl implements WebSocketTransformer { |
final StreamController<WebSocket> _controller = |
- new StreamController<WebSocket>(); |
+ new StreamController<WebSocket>(sync: true); |
Stream<WebSocket> bind(Stream<HttpRequest> stream) { |
stream.listen((request) { |
@@ -566,7 +566,7 @@ class _WebSocketConsumer implements StreamConsumer { |
_ensureController() { |
if (_controller != null) return; |
- _controller = new StreamController(onPause: () => _subscription.pause(), |
+ _controller = new StreamController(sync: true,onPause: () => _subscription.pause(), |
floitsch
2013/05/30 12:13:48
new line missing.
Lasse Reichstein Nielsen
2013/05/31 05:51:59
Done.
|
onResume: () => _subscription.resume(), |
onCancel: _onListen); |
var stream = _controller.stream.transform( |
@@ -628,7 +628,7 @@ class _WebSocketConsumer implements StreamConsumer { |
class _WebSocketImpl extends Stream implements WebSocket { |
- final StreamController _controller = new StreamController(); |
+ final StreamController _controller = new StreamController(sync: true); |
StreamSink _sink; |
final Socket _socket; |