mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-21 07:50:45 +01:00
control: skip networks that fail to initialize on rehash
This follows the launcher fix in 8321485315c9e83c1a45a053ec51ce81cd7977cc.
This commit is contained in:
parent
a2783d74c5
commit
ad5a11bf34
@ -130,11 +130,14 @@ def rehash():
|
|||||||
for network, sdata in new_conf['servers'].items():
|
for network, sdata in new_conf['servers'].items():
|
||||||
# Connect any new networks or disconnected networks if they aren't already.
|
# 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()):
|
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
|
# API note: 2.0.x style of starting network connections
|
||||||
world.networkobjects[network] = newirc = proto.Class(network)
|
world.networkobjects[network] = newirc = proto.Class(network)
|
||||||
newirc.connect()
|
newirc.connect()
|
||||||
|
except:
|
||||||
|
log.exception('Failed to initialize network %r, skipping it...', network)
|
||||||
|
|
||||||
log.info('Finished reloading PyLink configuration.')
|
log.info('Finished reloading PyLink configuration.')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user