Index: sdk/lib/io/secure_socket.dart |
diff --git a/sdk/lib/io/secure_socket.dart b/sdk/lib/io/secure_socket.dart |
index c271d77794f12673e56372aed54a7ba0279b3739..07ef23ea1482b1a0ce80bda09b8fe706001193b4 100644 |
--- a/sdk/lib/io/secure_socket.dart |
+++ b/sdk/lib/io/secure_socket.dart |
@@ -842,7 +842,9 @@ class _RawSecureSocket extends Stream<RawSocketEvent> |
} |
void _tryFilter() { |
- if (_status == CLOSED) return; |
+ if (_status == CLOSED) { |
+ return; |
+ } |
if (_filterPending && !_filterActive) { |
_filterActive = true; |
_filterPending = false; |
@@ -858,7 +860,9 @@ class _RawSecureSocket extends Stream<RawSocketEvent> |
if (_filterStatus.writeEmpty && _closedWrite && !_socketClosedWrite) { |
// Checks for and handles all cases of partially closed sockets. |
shutdown(SocketDirection.SEND); |
- if (_status == CLOSED) return; |
+ if (_status == CLOSED) { |
+ return; |
+ } |
} |
if (_filterStatus.readEmpty && _socketClosedRead && !_closedRead) { |
if (_status == HANDSHAKE) { |
@@ -870,14 +874,26 @@ class _RawSecureSocket extends Stream<RawSocketEvent> |
} |
_closeHandler(); |
} |
- if (_status == CLOSED) return; |
+ if (_status == CLOSED) { |
+ return; |
+ } |
if (_filterStatus.progress) { |
_filterPending = true; |
- if (_filterStatus.writePlaintextNoLongerFull) _sendWriteEvent(); |
- if (_filterStatus.readEncryptedNoLongerFull) _readSocket(); |
- if (_filterStatus.writeEncryptedNoLongerEmpty) _writeSocket(); |
- if (_filterStatus.readPlaintextNoLongerEmpty) _scheduleReadEvent(); |
- if (_status == HANDSHAKE) _secureHandshake(); |
+ if (_filterStatus.writeEncryptedNoLongerEmpty) { |
+ _writeSocket(); |
+ } |
+ if (_filterStatus.writePlaintextNoLongerFull) { |
+ _sendWriteEvent(); |
+ } |
+ if (_filterStatus.readEncryptedNoLongerFull) { |
+ _readSocket(); |
+ } |
+ if (_filterStatus.readPlaintextNoLongerEmpty) { |
+ _scheduleReadEvent(); |
+ } |
+ if (_status == HANDSHAKE) { |
+ _secureHandshake(); |
+ } |
} |
_tryFilter(); |
}).catchError(_reportError); |