mirror of https://github.com/Shizmob/pydle.git
Don't bother waiting for messages if we already have one in queue.
This commit is contained in:
parent
6a3b63a825
commit
db2b883a6d
|
@ -436,6 +436,9 @@ class ConnectionPool:
|
|||
sockets = { conn.socket: conn for conn in self.connections if conn.connected }
|
||||
found = False
|
||||
|
||||
if self.has_message():
|
||||
return
|
||||
|
||||
while not found:
|
||||
# Wait forever until a socket becomes readable.
|
||||
readable, writable, error = select.select(sockets.keys(), [], [])
|
||||
|
|
Loading…
Reference in New Issue