From 00e20c54b04c5dcc9be9c7fc78add8ec1d64cbf1 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Wed, 18 Dec 2019 04:09:37 -0600 Subject: [PATCH] don't try to connect to peers in offline mode --- src/communicator/onlinepeers/onlinepeers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/communicator/onlinepeers/onlinepeers.py b/src/communicator/onlinepeers/onlinepeers.py index 5a6851b4..3963644a 100644 --- a/src/communicator/onlinepeers/onlinepeers.py +++ b/src/communicator/onlinepeers/onlinepeers.py @@ -28,6 +28,9 @@ def get_online_peers(comm_inst): ]connects to more peers if we have none connected """ config = comm_inst.config + if config.get('general.offline_mode', False): + comm_inst.decrementThreadCount('get_online_peers') + return logger.debug('Refreshing peer pool...') maxPeers = int(config.get('peers.max_connect', 10)) needed = maxPeers - len(comm_inst.onlinePeers)