From b507cbaac5921023c17068b616efdbbecbd89920 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 29 Jan 2015 00:35:56 +0100 Subject: asyncio: Fix SSLProtocol.eof_received() Wake-up the waiter if it is not done yet. --- Lib/asyncio/sslproto.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lib/asyncio/sslproto.py') diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py index f2b856c40cb..26937c84265 100644 --- a/Lib/asyncio/sslproto.py +++ b/Lib/asyncio/sslproto.py @@ -489,6 +489,10 @@ class SSLProtocol(protocols.Protocol): try: if self._loop.get_debug(): logger.debug("%r received EOF", self) + + if self._waiter is not None and not self._waiter.done(): + self._waiter.set_exception(ConnectionResetError()) + if not self._in_handshake: keep_open = self._app_protocol.eof_received() if keep_open: -- cgit v1.2.3