Index: runtime/bin/socket_patch.dart |
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart |
index fae7902b08ecdd35c66088373c94ec43ce3a1b1b..81e8ab379728d001376dd6c6a8b4179a6f799f6d 100644 |
--- a/runtime/bin/socket_patch.dart |
+++ b/runtime/bin/socket_patch.dart |
@@ -471,7 +471,7 @@ class _RawServerSocket extends Stream<RawSocket> |
} |
void _onSubscriptionStateChange() { |
- if (_controller.hasSubscribers) { |
+ if (_controller.hasListener) { |
_resume(); |
} else { |
close(); |
@@ -598,7 +598,7 @@ class _RawSocket extends Stream<RawSocketEvent> |
} |
void _onSubscriptionStateChange() { |
- if (_controller.hasSubscribers) { |
+ if (_controller.hasListener) { |
_resume(); |
} else { |
close(); |
@@ -867,7 +867,7 @@ class _Socket extends Stream<List<int>> implements Socket { |
} |
void _onSubscriptionStateChange() { |
- if (_controller.hasSubscribers) { |
+ if (_controller.hasListener) { |
_ensureRawSocketSubscription(); |
// Enable read events for providing data to subscription. |
if (_raw != null) { |