mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +01:00
Irc: fix the logic checking for data in run()
This commit is contained in:
parent
e756af42ee
commit
684eac9583
4
main.py
4
main.py
@ -130,8 +130,8 @@ class Irc():
|
|||||||
log.debug('(%s) self.pingtimeout: %s', self.name, self.pingtimeout)
|
log.debug('(%s) self.pingtimeout: %s', self.name, self.pingtimeout)
|
||||||
data = self.socket.recv(2048)
|
data = self.socket.recv(2048)
|
||||||
buf += data
|
buf += data
|
||||||
if self.connected and not data:
|
if self.connected.is_set() and not data:
|
||||||
log.warn('(%s) No data received and self.connected is not set; disconnecting!', self.name)
|
log.warn('(%s) No data received and self.connected is set; disconnecting!', self.name)
|
||||||
break
|
break
|
||||||
while b'\n' in buf:
|
while b'\n' in buf:
|
||||||
line, buf = buf.split(b'\n', 1)
|
line, buf = buf.split(b'\n', 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user