summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-28 23:35:56 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-01-28 23:35:56 (GMT)
commitb507cbaac5921023c17068b616efdbbecbd89920 (patch)
treeaa903ce9662fe5c563b03178b239f461aa20b6dd /Lib/asyncio
parenta89f5f049294c6d1782d9ec7be2d2b950c9a8619 (diff)
downloadcpython-b507cbaac5921023c17068b616efdbbecbd89920.zip
cpython-b507cbaac5921023c17068b616efdbbecbd89920.tar.gz
cpython-b507cbaac5921023c17068b616efdbbecbd89920.tar.bz2
asyncio: Fix SSLProtocol.eof_received()
Wake-up the waiter if it is not done yet.
Diffstat (limited to 'Lib/asyncio')
-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 f2b856c..26937c8 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: