From 6c907e204635be845e0b3f32a613c86ca3aafa35 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Fri, 17 Feb 2017 21:14:39 +0100 Subject: [PATCH] Windows socket typo --- src/class_receiveDataThread.py | 2 +- src/class_sendDataThread.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/class_receiveDataThread.py b/src/class_receiveDataThread.py index c3b37865..56373458 100644 --- a/src/class_receiveDataThread.py +++ b/src/class_receiveDataThread.py @@ -118,7 +118,7 @@ class receiveDataThread(threading.Thread): except socket.error as err: if err.errno in (errno.EAGAIN, errno.EWOULDBLOCK) or \ (sys.platform.startswith('win') and \ - err.errno in (errno.WSAEWOULDBLOCK)): + err.errno == errno.WSAEWOULDBLOCK): select.select([self.sslSock if isSSL else self.sock], [], [], 10) logger.debug('sock.recv retriable error') continue diff --git a/src/class_sendDataThread.py b/src/class_sendDataThread.py index 667850cd..7defb634 100644 --- a/src/class_sendDataThread.py +++ b/src/class_sendDataThread.py @@ -100,7 +100,7 @@ class sendDataThread(threading.Thread): except socket.error as e: if e.errno in (errno.EAGAIN, errno.EWOULDBLOCK) or \ (sys.platform.startswith('win') and \ - e.errno in (errno.WSAEWOULDBLOCK)): + e.errno == errno.WSAEWOULDBLOCK): select.select([], [self.sslSock if isSSL else self.sock], [], 10) logger.debug('sock.recv retriable error') continue