Commit b5db7b51 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Turn listeners and listenersRegistered instance variables volatile

parent b54dd6f0
......@@ -70,10 +70,10 @@ public class RocketChatWebSocketThread extends HandlerThread {
private final String hostname;
private final RealmHelper realmHelper;
private final ConnectivityManagerInternal connectivityManager;
private final ArrayList<Registrable> listeners = new ArrayList<>();
private volatile ArrayList<Registrable> listeners = new ArrayList<>();
private final CompositeDisposable heartbeatDisposable = new CompositeDisposable();
private final CompositeDisposable reconnectDisposable = new CompositeDisposable();
private boolean listenersRegistered;
private volatile boolean listenersRegistered;
private RocketChatWebSocketThread(Context appContext, String hostname) {
super("RC_thread_" + hostname);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment