Delete old auth cookie before starting Tor.

This commit is contained in:
akwizgran
2018-06-29 15:28:50 +01:00
parent 135372ebee
commit 2e002d132c

View File

@@ -189,6 +189,8 @@ class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
if (used.getAndSet(true)) throw new IllegalStateException();
// Install or update the assets if necessary
if (!assetsAreUpToDate()) installAssets();
if (cookieFile.exists() && !cookieFile.delete())
LOG.warning("Old auth cookie not deleted");
// Start a new Tor process
LOG.info("Starting Tor");
String torPath = torFile.getAbsolutePath();