Windows socket typo

This commit is contained in:
Peter Šurda 2017-02-17 21:14:39 +01:00
parent f499a3b1d8
commit 6c907e2046
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
2 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ class receiveDataThread(threading.Thread):
except socket.error as err: except socket.error as err:
if err.errno in (errno.EAGAIN, errno.EWOULDBLOCK) or \ if err.errno in (errno.EAGAIN, errno.EWOULDBLOCK) or \
(sys.platform.startswith('win') and \ (sys.platform.startswith('win') and \
err.errno in (errno.WSAEWOULDBLOCK)): err.errno == errno.WSAEWOULDBLOCK):
select.select([self.sslSock if isSSL else self.sock], [], [], 10) select.select([self.sslSock if isSSL else self.sock], [], [], 10)
logger.debug('sock.recv retriable error') logger.debug('sock.recv retriable error')
continue continue

View File

@ -100,7 +100,7 @@ class sendDataThread(threading.Thread):
except socket.error as e: except socket.error as e:
if e.errno in (errno.EAGAIN, errno.EWOULDBLOCK) or \ if e.errno in (errno.EAGAIN, errno.EWOULDBLOCK) or \
(sys.platform.startswith('win') and \ (sys.platform.startswith('win') and \
e.errno in (errno.WSAEWOULDBLOCK)): e.errno == errno.WSAEWOULDBLOCK):
select.select([], [self.sslSock if isSSL else self.sock], [], 10) select.select([], [self.sslSock if isSSL else self.sock], [], 10)
logger.debug('sock.recv retriable error') logger.debug('sock.recv retriable error')
continue continue