NPE during re-subscription fixed

pull/555/head
Nikita 9 years ago
parent 122ac10db3
commit b3fed96b25

@ -61,6 +61,10 @@ public class PubSubConnectionEntry {
} }
public void addListener(String channelName, RedisPubSubListener<?> listener) { public void addListener(String channelName, RedisPubSubListener<?> listener) {
if (listener == null) {
return;
}
Queue<RedisPubSubListener> queue = channelListeners.get(channelName); Queue<RedisPubSubListener> queue = channelListeners.get(channelName);
if (queue == null) { if (queue == null) {
queue = new ConcurrentLinkedQueue<RedisPubSubListener>(); queue = new ConcurrentLinkedQueue<RedisPubSubListener>();

Loading…
Cancel
Save