mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +01:00
Make reconnecting a bit less... broken
This commit is contained in:
parent
fdea348cbe
commit
bc9863d9e0
2
main.py
2
main.py
@ -107,7 +107,7 @@ class Irc():
|
||||
log.debug('(%s) self.pingtimeout: %s', self.name, self.pingtimeout)
|
||||
data = self.socket.recv(2048).decode("utf-8")
|
||||
buf += data
|
||||
if not data:
|
||||
if self.connected and not data:
|
||||
break
|
||||
while '\n' in buf:
|
||||
line, buf = buf.split('\n', 1)
|
||||
|
@ -19,7 +19,7 @@ def normalizeNick(irc, netname, nick, separator="/"):
|
||||
# Block until we know the IRC network's nick length (after capabilities
|
||||
# are sent)
|
||||
log.debug('(%s) normalizeNick: waiting for irc.connected', irc.name)
|
||||
irc.connected.wait(3)
|
||||
irc.connected.wait(1)
|
||||
|
||||
orig_nick = nick
|
||||
protoname = irc.proto.__name__
|
||||
|
Loading…
Reference in New Issue
Block a user