Skip to content
Snippets Groups Projects
Unverified Commit 95eca2a8 authored by n8 fr8's avatar n8 fr8 Committed by GitHub
Browse files

Merge pull request #77 from eighthave/volatile

use "volatile" for key variables that are accessed across threads
parents 31422fbe dc2e19e8
Branches
No related tags found
No related merge requests found
...@@ -192,7 +192,7 @@ public class TorService extends Service { ...@@ -192,7 +192,7 @@ public class TorService extends Service {
private long torConfiguration = -1; private long torConfiguration = -1;
private int torControlFd = -1; private int torControlFd = -1;
private TorControlConnection torControlConnection; private volatile TorControlConnection torControlConnection;
/** /**
* This lock must be acquired before calling createTorConfiguration() and * This lock must be acquired before calling createTorConfiguration() and
...@@ -310,7 +310,7 @@ public class TorService extends Service { ...@@ -310,7 +310,7 @@ public class TorService extends Service {
} }
}; };
private CountDownLatch controlPortThreadStarted; private volatile CountDownLatch controlPortThreadStarted;
private int getPortFromGetInfo(String key) { private int getPortFromGetInfo(String key) {
final String value = getInfo(key); final String value = getInfo(key);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment