diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-05 18:06:38 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-05 18:06:38 (GMT) |
commit | 6703d032a5a695051a1c24847de6d35fd9842242 (patch) | |
tree | 271cfe4e9a54f7a08e602916b078c3526cd6eafd /Lib | |
parent | 22506d24ee1a82fc9e5d268645113d1256114072 (diff) | |
parent | 8c125eb44b528ba22b43cdf5da49e408082865fa (diff) | |
download | cpython-6703d032a5a695051a1c24847de6d35fd9842242.zip cpython-6703d032a5a695051a1c24847de6d35fd9842242.tar.gz cpython-6703d032a5a695051a1c24847de6d35fd9842242.tar.bz2 |
Merge 3.4 (asyncio)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/asyncio/sslproto.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py index e566946..e5ae49a 100644 --- a/Lib/asyncio/sslproto.py +++ b/Lib/asyncio/sslproto.py @@ -613,7 +613,8 @@ class SSLProtocol(protocols.Protocol): if data: ssldata, offset = self._sslpipe.feed_appdata(data, offset) elif offset: - ssldata = self._sslpipe.do_handshake(self._on_handshake_complete) + ssldata = self._sslpipe.do_handshake( + self._on_handshake_complete) offset = 1 else: ssldata = self._sslpipe.shutdown(self._finalize) @@ -637,9 +638,13 @@ class SSLProtocol(protocols.Protocol): self._write_buffer_size -= len(data) except BaseException as exc: if self._in_handshake: + # BaseExceptions will be re-raised in _on_handshake_complete. self._on_handshake_complete(exc) else: self._fatal_error(exc, 'Fatal error on SSL transport') + if not isinstance(exc, Exception): + # BaseException + raise def _fatal_error(self, exc, message='Fatal error on transport'): # Should be called from exception handler only. |