make network check obey offline mode
This commit is contained in:
parent
abe1dde57e
commit
f42e777408
@ -37,7 +37,10 @@ def net_check(comm_inst):
|
|||||||
pass
|
pass
|
||||||
if not rec and not netutils.checkNetwork(torPort=comm_inst.proxyPort):
|
if not rec and not netutils.checkNetwork(torPort=comm_inst.proxyPort):
|
||||||
if not comm_inst.shutdown:
|
if not comm_inst.shutdown:
|
||||||
logger.warn('Network check failed, are you connected to the Internet, and is Tor working?', terminal=True)
|
if not comm_inst.config.get('general.offline_mode', False):
|
||||||
|
logger.warn('Network check failed, are you connected to ' +
|
||||||
|
'the Internet, and is Tor working?',
|
||||||
|
terminal=True)
|
||||||
restarttor.restart(comm_inst)
|
restarttor.restart(comm_inst)
|
||||||
comm_inst.offlinePeers = []
|
comm_inst.offlinePeers = []
|
||||||
comm_inst.isOnline = False
|
comm_inst.isOnline = False
|
||||||
|
Loading…
Reference in New Issue
Block a user