Index: sdk/lib/io/secure_socket.dart |
diff --git a/sdk/lib/io/secure_socket.dart b/sdk/lib/io/secure_socket.dart |
index ee94dc595b4c0707ba0d1b95afb2d98c2537973b..417534a5d7f632b50484bb4cbe2749b63754361b 100644 |
--- a/sdk/lib/io/secure_socket.dart |
+++ b/sdk/lib/io/secure_socket.dart |
@@ -734,7 +734,9 @@ class _RawSecureSocket extends Stream<RawSocketEvent> |
} |
void _reportError(e) { |
- if (_connectPending) { |
+ if (_status == CLOSED) { |
+ return; |
+ } else if (_connectPending) { |
// _connectPending is true after the underlying connection has been |
// made, but before the handshake has completed. |
if (e is! TlsException) { |
@@ -947,6 +949,9 @@ class _RawSecureSocket extends Stream<RawSocketEvent> |
} |
return _filterService.call(args).then((response) { |
+ if (response.length == 2) { |
+ _reportError(new TlsException('${response[1]} error ${response[0]}')); |
+ } |
bool wasInHandshake = response[1]; |
int start(int index) => response[2 * index + 2]; |
int end(int index) => response[2 * index + 3]; |