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

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

Issue 18500006: dart:io | Pass errors from multithreaded encryption back to Dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Compile libssl_dart without DEBUG defined. Created 7 years, 5 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 | « runtime/bin/socket_patch.dart ('k') | sdk/lib/io/socket.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 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];
« no previous file with comments | « runtime/bin/socket_patch.dart ('k') | sdk/lib/io/socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698