3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-02-02 15:44:06 +01:00

relay: experimental fix for #183

This commit is contained in:
James Lu 2016-03-30 18:33:44 -07:00
parent 2169a9be28
commit d21344342d

View File

@ -237,7 +237,6 @@ def getRemoteSid(irc, remoteirc):
except ValueError: # Network not initialized yet.
log.exception('(%s) Failed to spawn server for %r:',
irc.name, remoteirc.name)
irc.disconnect()
return
else:
irc.servers[sid].remote = remoteirc.name
@ -1178,6 +1177,7 @@ def handle_disconnect(irc, numeric, command, args):
"""Handles IRC network disconnections (internal hook)."""
# Quit all of our users' representations on other nets, and remove
# them from our relay clients index.
with spawnlocks[irc.name]:
for k, v in relayusers.copy().items():
if irc.name in v:
del relayusers[k][irc.name]
@ -1189,6 +1189,7 @@ def handle_disconnect(irc, numeric, command, args):
pass
# SQUIT all relay pseudoservers spawned for us, and remove them
# from our relay subservers index.
with spawnlocks_servers[irc.name]:
for name, ircobj in world.networkobjects.copy().items():
if name != irc.name and ircobj.connected.is_set():
try: