3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 13:09:23 +01:00

control: skip networks that fail to initialize on rehash

This follows the launcher fix in 8321485315.
This commit is contained in:
James Lu 2018-03-02 19:53:27 -08:00
parent a2783d74c5
commit ad5a11bf34

View File

@ -130,11 +130,14 @@ def rehash():
for network, sdata in new_conf['servers'].items():
# Connect any new networks or disconnected networks if they aren't already.
if (network not in world.networkobjects) or (not world.networkobjects[network]._connection_thread.is_alive()):
proto = utils.getProtocolModule(sdata['protocol'])
try:
proto = utils.getProtocolModule(sdata['protocol'])
# API note: 2.0.x style of starting network connections
world.networkobjects[network] = newirc = proto.Class(network)
newirc.connect()
# API note: 2.0.x style of starting network connections
world.networkobjects[network] = newirc = proto.Class(network)
newirc.connect()
except:
log.exception('Failed to initialize network %r, skipping it...', network)
log.info('Finished reloading PyLink configuration.')