mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 00:45:16 +00:00
Fix close drain error callback.
Closes https://github.com/dart-lang/sdk/pull/54020 GitOrigin-RevId: c9791a23035d980665dba73927d2a5bed2be861b Change-Id: Id70d6d42f2460fa6c853fb334167a67d00f8ef8c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335506 Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Slava Egorov <vegorov@google.com>
This commit is contained in:
parent
8b564e0bea
commit
5918e012cc
|
@ -1250,7 +1250,7 @@ class _WebSocketImpl extends Stream with _ServiceObject implements WebSocket {
|
|||
// 2) set a timer terminate the connection if a close frame is
|
||||
// not received.
|
||||
if (!_controller.hasListener && _subscription != null) {
|
||||
_controller.stream.drain().catchError((_) => {});
|
||||
_controller.stream.drain().catchError((_) {});
|
||||
}
|
||||
_closeTimer ??= Timer(const Duration(seconds: 5), () {
|
||||
// Reuse code and reason from the local close.
|
||||
|
|
Loading…
Reference in a new issue