Skip to content
Snippets Groups Projects
Verified Commit dc2e19e8 authored by Hans-Christoph Steiner's avatar Hans-Christoph Steiner
Browse files

use "volatile" for key variables that are accessed across threads

parent 31422fbe
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