mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-23 19:19:31 +01:00
core: break attempts to read from a socket if no data is available
This commit is contained in:
parent
f87e646f35
commit
559b262db8
@ -1774,6 +1774,10 @@ class IRCNetwork(PyLinkNetworkCoreWithUtils):
|
||||
"""
|
||||
Message handler, called when select() has data to read.
|
||||
"""
|
||||
if self._socket is None:
|
||||
log.debug('(%s) Ignoring attempt to read data because self._socket is None', self.name)
|
||||
return
|
||||
|
||||
data = b''
|
||||
try:
|
||||
data = self._socket.recv(2048)
|
||||
|
Loading…
Reference in New Issue
Block a user