@@ -96,15 +96,15 @@ class HtmlWebSocketChannel extends StreamChannelMixin
9696 }
9797 // The socket API guarantees that only a single open event will be
9898 // emitted.
99- innerWebSocket.onOpen .first.then ((_) {
99+ innerWebSocket.onOpenX .first.then ((_) {
100100 _readyCompleter.complete ();
101101 _listen ();
102102 });
103103 }
104104
105105 // The socket API guarantees that only a single error event will be emitted,
106106 // and that once it is no open or message events will be emitted.
107- innerWebSocket.onError .first.then ((_) {
107+ innerWebSocket.onErrorX .first.then ((_) {
108108 // Unfortunately, the underlying WebSocket API doesn't expose any
109109 // specific information about the error itself.
110110 final error = WebSocketChannelException ('WebSocket connection failed.' );
@@ -115,11 +115,11 @@ class HtmlWebSocketChannel extends StreamChannelMixin
115115 _controller.local.sink.close ();
116116 });
117117
118- innerWebSocket.onMessage .listen (_innerListen);
118+ innerWebSocket.onMessageX .listen (_innerListen);
119119
120120 // The socket API guarantees that only a single error event will be emitted,
121121 // and that once it is no other events will be emitted.
122- innerWebSocket.onClose .first.then ((event) {
122+ innerWebSocket.onCloseX .first.then ((event) {
123123 _closeCode = event.code;
124124 _closeReason = event.reason;
125125 _controller.local.sink.close ();
0 commit comments