IrcClient.py:IrcClient.unqueue(): handle timeout from timed select().

This commit is contained in:
Lucio Andrés Illanes Albornoz 2018-01-03 15:13:52 +01:00
parent 97d8caaf1e
commit 9c34fe3220

View File

@ -109,6 +109,8 @@ class IrcClient:
self.clientQueue[0] = msg; return; self.clientQueue[0] = msg; return;
else: else:
readySet = select.select([], [self.clientSocket.fileno()], [], self.clientNextTimeout - timeNow) readySet = select.select([], [self.clientSocket.fileno()], [], self.clientNextTimeout - timeNow)
if len(readySet[1]) == 0:
self.clientQueue[0] = msg; return;
else: else:
readySet = select.select([], [self.clientSocket.fileno()], []) readySet = select.select([], [self.clientSocket.fileno()], [])
msgBytesSent = self.clientSocket.send(msg) msgBytesSent = self.clientSocket.send(msg)