don't try to connect to peers in offline mode
parent
f7e2a94502
commit
00e20c54b0
|
@ -28,6 +28,9 @@ def get_online_peers(comm_inst):
|
||||||
]connects to more peers if we have none connected
|
]connects to more peers if we have none connected
|
||||||
"""
|
"""
|
||||||
config = comm_inst.config
|
config = comm_inst.config
|
||||||
|
if config.get('general.offline_mode', False):
|
||||||
|
comm_inst.decrementThreadCount('get_online_peers')
|
||||||
|
return
|
||||||
logger.debug('Refreshing peer pool...')
|
logger.debug('Refreshing peer pool...')
|
||||||
maxPeers = int(config.get('peers.max_connect', 10))
|
maxPeers = int(config.get('peers.max_connect', 10))
|
||||||
needed = maxPeers - len(comm_inst.onlinePeers)
|
needed = maxPeers - len(comm_inst.onlinePeers)
|
||||||
|
|
Loading…
Reference in New Issue