Close WebSocketExtraneousEventHandler
.
This commit is contained in:
parent
0dbdd96e8c
commit
66d3fb2e04
2 changed files with 6 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
# 2.0.1
|
||||
* Add `reconnectOnClose` and `reconnectinterval` parameters in top-level `WebSockets` constructors.
|
||||
* Close `WebSocketExtraneousEventHandler`.
|
||||
|
||||
# 2.0.0
|
||||
* Update to work with `client@2.0.0`.
|
||||
|
|
|
@ -94,6 +94,7 @@ abstract class BaseWebSocketClient extends BaseAngelClient {
|
|||
|
||||
@override
|
||||
Future close() async {
|
||||
on._close();
|
||||
await _socket.sink.close(status.goingAway);
|
||||
_onData.close();
|
||||
_onAllEvents.close();
|
||||
|
@ -434,4 +435,8 @@ class WebSocketExtraneousEventHandler {
|
|||
|
||||
return _events[index].stream;
|
||||
}
|
||||
|
||||
void _close() {
|
||||
_events.values.forEach((s) => s.close());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue