summaryrefslogtreecommitdiff
path: root/Lib/asyncio/sslproto.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-29 00:35:56 +0100
committerVictor Stinner <victor.stinner@gmail.com>2015-01-29 00:35:56 +0100
commitb507cbaac5921023c17068b616efdbbecbd89920 (patch)
treeaa903ce9662fe5c563b03178b239f461aa20b6dd /Lib/asyncio/sslproto.py
parenta89f5f049294c6d1782d9ec7be2d2b950c9a8619 (diff)
downloadcpython-git-b507cbaac5921023c17068b616efdbbecbd89920.tar.gz
asyncio: Fix SSLProtocol.eof_received()
Wake-up the waiter if it is not done yet.
Diffstat (limited to 'Lib/asyncio/sslproto.py')
-rw-r--r--Lib/asyncio/sslproto.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py
index f2b856c40c..26937c8426 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: