on start and tor daemon not running, kill all daemons before starting again
To make sure there are not any other daemons still running when trying to start the whole thing again, kill all daemons before starting tor afresh.
This commit is contained in:
parent
2bc85a4a3a
commit
cf0adc27d6
|
@ -167,8 +167,7 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
|
|||
}
|
||||
|
||||
|
||||
private boolean findExistingProc ()
|
||||
{
|
||||
private boolean findExistingTorDaemon() {
|
||||
if (fileTor != null)
|
||||
{
|
||||
try
|
||||
|
@ -631,7 +630,7 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
|
|||
{
|
||||
try
|
||||
{
|
||||
findExistingProc ();
|
||||
findExistingTorDaemon();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -1305,13 +1304,11 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
|
|||
try
|
||||
{
|
||||
|
||||
boolean found = findExistingProc ();
|
||||
boolean found = findExistingTorDaemon();
|
||||
|
||||
if (!found)
|
||||
{
|
||||
killProcess(fileTor);
|
||||
killProcess(filePolipo);
|
||||
|
||||
killAllDaemons();
|
||||
startTor();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue