From 9c34fe32209de6a8deca9cbfbd3036200841f12f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Wed, 3 Jan 2018 15:13:52 +0100 Subject: [PATCH] IrcClient.py:IrcClient.unqueue(): handle timeout from timed select(). --- IrcClient.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/IrcClient.py b/IrcClient.py index 03e0e6f..90b2629 100644 --- a/IrcClient.py +++ b/IrcClient.py @@ -109,6 +109,8 @@ class IrcClient: self.clientQueue[0] = msg; return; else: readySet = select.select([], [self.clientSocket.fileno()], [], self.clientNextTimeout - timeNow) + if len(readySet[1]) == 0: + self.clientQueue[0] = msg; return; else: readySet = select.select([], [self.clientSocket.fileno()], []) msgBytesSent = self.clientSocket.send(msg)