3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-02-17 14:01:03 +01:00

relay: fix regression causing 'load relay' to freeze

This commit is contained in:
James Lu 2016-05-01 14:09:17 -07:00
parent 69cd3cfbf8
commit ab5624343b

View File

@ -49,15 +49,21 @@ def main(irc=None):
# Load the relay links database. # Load the relay links database.
loadDB() loadDB()
log.debug('relay.main: loading links database')
# Schedule periodic exports of the links database. # Schedule periodic exports of the links database.
scheduleExport(starting=True) scheduleExport(starting=True)
log.debug('relay.main: scheduling export loop')
if irc is not None: if irc is not None:
# irc is defined when the plugin is reloaded. Otherweise, # irc is defined when the plugin is reloaded. Otherwise, it means that we've just started the
# it means that we've just started the server. # server. Iterate over all connected networks and initialize their relay users.
# Iterate over all known networks and initialize them.
for ircobj in world.networkobjects.values(): for ircobj in world.networkobjects.values():
initializeAll(ircobj) if ircobj.connected.is_set():
initializeAll(ircobj)
log.debug('relay.main: finished initialization sequence')
def die(sourceirc): def die(sourceirc):
"""Deinitialize PyLink Relay by quitting all relay clients and saving the """Deinitialize PyLink Relay by quitting all relay clients and saving the