mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
asyncio: Fix SSLProtocol.eof_received()
Wake-up the waiter if it is not done yet.
This commit is contained in:
parent
a89f5f0492
commit
b507cbaac5
2 changed files with 33 additions and 11 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue