@@ -96,15 +96,15 @@ class HtmlWebSocketChannel extends StreamChannelMixin
96
96
}
97
97
// The socket API guarantees that only a single open event will be
98
98
// emitted.
99
- innerWebSocket.onOpen .first.then ((_) {
99
+ innerWebSocket.onOpenX .first.then ((_) {
100
100
_readyCompleter.complete ();
101
101
_listen ();
102
102
});
103
103
}
104
104
105
105
// The socket API guarantees that only a single error event will be emitted,
106
106
// and that once it is no open or message events will be emitted.
107
- innerWebSocket.onError .first.then ((_) {
107
+ innerWebSocket.onErrorX .first.then ((_) {
108
108
// Unfortunately, the underlying WebSocket API doesn't expose any
109
109
// specific information about the error itself.
110
110
final error = WebSocketChannelException ('WebSocket connection failed.' );
@@ -115,11 +115,11 @@ class HtmlWebSocketChannel extends StreamChannelMixin
115
115
_controller.local.sink.close ();
116
116
});
117
117
118
- innerWebSocket.onMessage .listen (_innerListen);
118
+ innerWebSocket.onMessageX .listen (_innerListen);
119
119
120
120
// The socket API guarantees that only a single error event will be emitted,
121
121
// and that once it is no other events will be emitted.
122
- innerWebSocket.onClose .first.then ((event) {
122
+ innerWebSocket.onCloseX .first.then ((event) {
123
123
_closeCode = event.code;
124
124
_closeReason = event.reason;
125
125
_controller.local.sink.close ();
0 commit comments