mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Fix NullPointerException with external tor usage
If torControlPort is specified, but neither torControlPassword nor torControlCookieFile are specified, we have cookieFile == null in bisq.network.p2p.network.RunningTor, but RunningTor.getTor() assumes a cookie file has been specified and tries to check that the file exists, causing the thread to crash. Added a check for null to fix this.
This commit is contained in:
parent
716947a799
commit
8c526d4b8c
@ -64,7 +64,7 @@ public class RunningTor extends TorMode {
|
||||
Tor result;
|
||||
if (!password.isEmpty())
|
||||
result = new ExternalTor(controlPort, password);
|
||||
else if (cookieFile.exists())
|
||||
else if (cookieFile != null && cookieFile.exists())
|
||||
result = new ExternalTor(controlPort, cookieFile, useSafeCookieAuthentication);
|
||||
else
|
||||
result = new ExternalTor(controlPort);
|
||||
|
Loading…
Reference in New Issue
Block a user