Merge branch '1329-auth-cookie' into 'master'

Delete old auth cookie before starting Tor

Closes #1329

See merge request briar/briar!852
This commit is contained in:
Torsten Grote
2018-06-29 15:38:23 +00:00

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();