Commit 2c22575c authored by Kirill Smelkov's avatar Kirill Smelkov

Merge branch 'y/ssl-EOF-1.12' into pynext

* y/ssl-EOF-1.12:
  ssl: Don't ignore non-ragged EOF
parents cb1c9934 bca99c55
...@@ -278,7 +278,12 @@ class _SSL: ...@@ -278,7 +278,12 @@ class _SSL:
def receive(self, read_buf): def receive(self, read_buf):
try: try:
while 1: while 1:
read_buf.append(self.socket.recv(4096)) data = self.socket.recv(4096)
if data == b'':
# non-ragged EOF (peer properly closed its side of connection)
self._error('recv', None)
return
read_buf.append(data)
except ssl.SSLWantReadError: except ssl.SSLWantReadError:
pass pass
except socket.error, e: except socket.error, e:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment