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

Unified Diff: sdk/lib/io/secure_socket.dart

Issue 14103010: Change hasSubscribers to hasListener. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Created 7 years, 8 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 | « sdk/lib/io/secure_server_socket.dart ('k') | sdk/lib/web_audio/dart2js/web_audio_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/secure_socket.dart
diff --git a/sdk/lib/io/secure_socket.dart b/sdk/lib/io/secure_socket.dart
index 41fdf59a81d0a1c8e77f8432e5a925d4c7978167..197e87d4a889cce534049a779cf8952b6fd14381 100644
--- a/sdk/lib/io/secure_socket.dart
+++ b/sdk/lib/io/secure_socket.dart
@@ -391,7 +391,7 @@ class _RawSecureSocket extends Stream<RawSocketEvent>
void set writeEventsEnabled(bool value) {
if (value &&
- _controller.hasSubscribers &&
+ _controller.hasListener &&
_secureFilter != null &&
_secureFilter.buffers[WRITE_PLAINTEXT].free > 0) {
Timer.run(() => _controller.add(RawSocketEvent.WRITE));
@@ -501,7 +501,7 @@ class _RawSecureSocket extends Stream<RawSocketEvent>
_secureHandshake();
} catch (e) { _reportError(e, "RawSecureSocket error"); }
} else if (_status == CONNECTED &&
- _controller.hasSubscribers &&
+ _controller.hasListener &&
_writeEventsEnabled &&
_secureFilter.buffers[WRITE_PLAINTEXT].free > 0) {
// Reset the one-shot handler.
@@ -628,7 +628,7 @@ class _RawSecureSocket extends Stream<RawSocketEvent>
}
void _onSubscriptionStateChange() {
- if (_controller.hasSubscribers) {
+ if (_controller.hasListener) {
// TODO(ajohnsen): Do something here?
}
}
« no previous file with comments | « sdk/lib/io/secure_server_socket.dart ('k') | sdk/lib/web_audio/dart2js/web_audio_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698