make tor restart more aggressive as last resort for tor-death bug
parent
3e99bd3a83
commit
00e2445475
|
@ -17,11 +17,12 @@
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
'''
|
'''
|
||||||
import os, sys, base64, subprocess, signal
|
import os, sys, base64, subprocess, signal, time
|
||||||
import config, logger
|
import config, logger
|
||||||
from . import getopenport
|
from . import getopenport
|
||||||
from utils import identifyhome
|
from utils import identifyhome
|
||||||
config.reload()
|
config.reload()
|
||||||
|
TOR_KILL_WAIT = 3
|
||||||
class NetController:
|
class NetController:
|
||||||
'''
|
'''
|
||||||
This class handles hidden service setup on Tor and I2P
|
This class handles hidden service setup on Tor and I2P
|
||||||
|
@ -179,5 +180,8 @@ HiddenServicePort 80 ''' + self.apiServerIP + ''':''' + str(self.hsPort)
|
||||||
pass
|
pass
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
|
time.sleep(TOR_KILL_WAIT)
|
||||||
return
|
try:
|
||||||
|
os.kill(int(pidN), signal.SIGKILL)
|
||||||
|
except (ProcessLookupError, PermissionError) as e:
|
||||||
|
pass
|
||||||
|
|
Loading…
Reference in New Issue