catch OpenSSL SysCallError, refs #4985

This commit is contained in:
Maximilian Hils 2021-12-20 22:23:23 +01:00
parent 96f77453cc
commit efd2980b8a

View File

@ -308,7 +308,7 @@ class _TLSLayer(tunnel.TunnelLayer):
def send_data(self, data: bytes) -> layer.CommandGenerator[None]: def send_data(self, data: bytes) -> layer.CommandGenerator[None]:
try: try:
self.tls.sendall(data) self.tls.sendall(data)
except SSL.ZeroReturnError: except (SSL.ZeroReturnError, SSL.SysCallError):
# The other peer may still be trying to send data over, which we discard here. # The other peer may still be trying to send data over, which we discard here.
pass pass
yield from self.tls_interact() yield from self.tls_interact()