Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(960)

Unified Diff: runtime/bin/socket_patch.dart

Issue 15981003: Make new StreamController().isPaused be true until the first listener arrives. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/async/stream_controller.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_patch.dart
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 81c89754185be05f6150463181549a4dc8ffa79e..d86a17c1d8de72491c92c29d068310286db63a87 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -700,7 +700,7 @@ class _RawSocket extends Stream<RawSocketEvent>
void set readEventsEnabled(bool value) {
if (value != _readEventsEnabled) {
_readEventsEnabled = value;
- if (_controller.hasListener && !_controller.isPaused) _resume();
+ if (!_controller.isPaused) _resume();
}
}
@@ -708,7 +708,7 @@ class _RawSocket extends Stream<RawSocketEvent>
void set writeEventsEnabled(bool value) {
if (value != _writeEventsEnabled) {
_writeEventsEnabled = value;
- if (_controller.hasListener && !_controller.isPaused) _resume();
+ if (!_controller.isPaused) _resume();
}
}
« no previous file with comments | « no previous file | sdk/lib/async/stream_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698