We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a46a073 commit 5828720Copy full SHA for 5828720
src/drivers/Socket.py
@@ -200,6 +200,13 @@ def _read(self):
200
"""Called by _select() when we can read data."""
201
try:
202
new_data = self.conn.recv(1024)
203
+ if hasattr(self.conn, "pending") and self.conn.pending():
204
+ # This is a TLS socket and there are decrypted bytes in the
205
+ # buffer. We need to read them now, or we would not get them
206
+ # until the next time select() returns this socket (which may
207
+ # be in a very long time, as select() does not know recv() on
208
+ # the TLS wrapper would not block).
209
+ new_data += self.conn.recv(self.conn.pending())
210
if not new_data:
211
# Socket was closed
212
self._handleSocketError(None)
0 commit comments