From d4dd964069d653a9767fd627315ff53a8e2bc1c8 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Sun, 2 Feb 2020 19:07:48 -0600 Subject: [PATCH] don't restart tor unless its our own --- src/communicatorutils/restarttor.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/communicatorutils/restarttor.py b/src/communicatorutils/restarttor.py index d3d38062..232dd57b 100644 --- a/src/communicatorutils/restarttor.py +++ b/src/communicatorutils/restarttor.py @@ -1,5 +1,8 @@ import netcontroller +import config + def restart(comm_inst): - net = comm_inst.shared_state.get(netcontroller.NetController) - net.killTor() - net.startTor() + if not config.get('tor.use_existing_tor', False): + net = comm_inst.shared_state.get(netcontroller.NetController) + net.killTor() + net.startTor()