Skip to content

Commit 1267655

Browse files
committed
Merge pull request #100 from pusher/fix-97
Make connection event listeners concurrent hashmap. Resolves #97
2 parents 16d5b89 + c8f6970 commit 1267655

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/pusher/client/connection/websocket/WebSocketConnection.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import java.util.HashSet;
88
import java.util.Map;
99
import java.util.Set;
10+
import java.util.concurrent.ConcurrentHashMap;
1011
import java.util.concurrent.Future;
1112
import java.util.concurrent.TimeUnit;
1213

@@ -33,7 +34,7 @@ public class WebSocketConnection implements InternalConnection, WebSocketListene
3334

3435
private final Factory factory;
3536
private final ActivityTimer activityTimer;
36-
private final Map<ConnectionState, Set<ConnectionEventListener>> eventListeners = new HashMap<ConnectionState, Set<ConnectionEventListener>>();
37+
private final Map<ConnectionState, Set<ConnectionEventListener>> eventListeners = new ConcurrentHashMap<ConnectionState, Set<ConnectionEventListener>>();
3738
private final URI webSocketUri;
3839
private final Proxy proxy;
3940

0 commit comments

Comments
 (0)