sacOO7 / socketcluster-client-java

Native java and android client for socketcluster framework in node.js
http://socketcluster.io/
Apache License 2.0
94 stars 43 forks source link

Use ConcurrentHashMap to avoid any concurrency issue #42

Closed angelix closed 5 years ago

angelix commented 6 years ago

Using getChannelByName intensively while adding channels can result in ConcurrentModificationException.

java.util.ConcurrentModificationException : at java.util.ArrayList$Itr.next(ArrayList.java:860) : at io.github.sac.Socket.getChannelByName(Socket.java:73)

angelix commented 6 years ago

What do you think about this @sacOO7 ? Thanks

sacOO7 commented 6 years ago

I believe that's a great PR. will merge it soon.

On Sat, Sep 15, 2018, 3:25 PM Angelos Veglektsis notifications@github.com wrote:

What do you think about this @sacOO7 https://github.com/sacOO7 ? Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sacOO7/socketcluster-client-java/pull/42#issuecomment-421547837, or mute the thread https://github.com/notifications/unsubscribe-auth/AP8vSW6obyoyfIFECoOLRNTra6DARgcHks5ubM6ogaJpZM4WHgVs .