PubSubConnectionEntry.addListener sync fixed

pull/544/head
Nikita 9 years ago
parent a0b652ccb6
commit 7f0cc3efa0

@ -76,12 +76,17 @@ public class PubSubConnectionEntry {
}
}
boolean deleted = false;
synchronized (queue) {
if (channelListeners.get(channelName) != queue) {
addListener(channelName, listener);
return;
deleted = true;
} else {
queue.add(listener);
}
queue.add(listener);
}
if (deleted) {
addListener(channelName, listener);
return;
}
conn.addListener(listener);

Loading…
Cancel
Save