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

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

Issue 990893002: Fix error where upgrading a closed socket to secure will hang. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | tests/standalone/standalone.status » ('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 44d60849c1bad597ea44f161f6b2a0baeb3e8c8e..1dfd8c5330d3793e471522c6aed1883bcb75fd1a 100644
--- a/sdk/lib/io/secure_socket.dart
+++ b/sdk/lib/io/secure_socket.dart
@@ -558,6 +558,11 @@ class _RawSecureSocket extends Stream<RawSocketEvent>
throw new ArgumentError(
"Subscription passed to TLS upgrade is paused");
}
+ // If we are upgrading a socket that is already closed for read,
+ // report an error as if we received READ_CLOSED during the handshake.
+ if (_socket._socket.closedReadEventSent) {
+ _eventDispatcher(RawSocketEvent.READ_CLOSED);
+ }
_socketSubscription
..onData(_eventDispatcher)
..onError(_reportError)
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698