mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Closing transport during handshake process leaks socket (#480)
This commit is contained in:
parent
b4e5fee6f5
commit
a0e3d2dd09
3 changed files with 23 additions and 2 deletions
|
@ -546,8 +546,11 @@ class SSLProtocol(protocols.Protocol):
|
|||
def _start_shutdown(self):
|
||||
if self._in_shutdown:
|
||||
return
|
||||
self._in_shutdown = True
|
||||
self._write_appdata(b'')
|
||||
if self._in_handshake:
|
||||
self._abort()
|
||||
else:
|
||||
self._in_shutdown = True
|
||||
self._write_appdata(b'')
|
||||
|
||||
def _write_appdata(self, data):
|
||||
self._write_backlog.append((data, 0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue