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

relay: attempt to eliminate freezing when networks are down

This commit is contained in:
James Lu 2016-06-24 18:41:13 -07:00
parent 4c00479d78
commit 504a9be7d6

View File

@ -339,11 +339,9 @@ def getRemoteUser(irc, remoteirc, user, spawnIfMissing=True):
Gets the UID of the relay client requested on the target network (remoteirc), Gets the UID of the relay client requested on the target network (remoteirc),
spawning one if it doesn't exist and spawnIfMissing is True.""" spawning one if it doesn't exist and spawnIfMissing is True."""
# Wait until both the local and remote networks are working before trying to spawn anything. # Wait until both the network is working before trying to spawn anything.
log.debug('(%s) getRemoteUser: waiting for irc.connected', irc.name) log.debug('(%s) getRemoteUser: waiting for irc.connected', irc.name)
irc.connected.wait() irc.connected.wait()
log.debug('(%s) getRemoteUser: waiting for %s.connected', irc.name, remoteirc.name)
remoteirc.connected.wait()
# Don't spawn clones for registered service bots. # Don't spawn clones for registered service bots.
sbot = irc.isServiceBot(user) sbot = irc.isServiceBot(user)