Index: runtime/bin/socket_patch.dart |
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart |
index 2e7acd9b8af6117d0efe5d3867daddfaa2ae081c..d901d2823725b17109680c179d7f0ccf88637c80 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) { |