Skip to content

Prevent ConcurrentModificationException - #27

Merged
eoinsha merged 16 commits into
eoinsha:masterfrom
martinotten:master
Sep 20, 2016
Merged

eoinsha merged 16 commits into
eoinsha:masterfrom
martinotten:master

Conversation

@martinotten

Copy link
Copy Markdown
Contributor

The for loop in src/main/java/org/phoenixframework/channels/Socket.java could cause an ConcurrentModificationException in our project. The synchronized block should prevent that.
I also updated gradle.

vheathen and others added 11 commits May 27, 2016 21:16
Changed WeakHashMap to HashMap to get callbacks work
rejoinTimerTask runs rejoinUntilConnected() which checks for the current channel\socket state and either rejoin channel or schedule the next check. So the task must be set to start only once after each check.
rejoinTimerTask runs rejoinUntilConnected() which checks for the current channel\socket state and either rejoin channel or schedule the next check. So the task must be set to start only once after each check.
Current behaviour leads to the memory allocation error and application crash in case of the network problems.
This fix javaCompile error during gradle build.
Callbacks are garbage collecting in case of using WeakHashMaps
Change scheduleRepeatingTask() to scheduleTask()
@eoinsha

eoinsha commented Sep 16, 2016

Copy link
Copy Markdown
Owner

Thanks @Mobbit - could you please split the PR so I can merge the ConcurrentModificationException fix? Source compatibility is already merged. It'd be good to know what the goal of adding gradlew and those other gradle bits is.

@martinotten

martinotten commented Sep 16, 2016 •

Copy link
Copy Markdown
Contributor Author

@eoinsha Sure, will do it. The reason was that jitpack.io failed to build without it. A gradle wrapper is used to use a gradle version per project instead of the globally installed gradle.

@eoinsha
eoinsha merged commit a03a696 into eoinsha:master Sep 20, 2016
@eoinsha

eoinsha commented Sep 20, 2016

Copy link
Copy Markdown
Owner

Thanks @Mobbit 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants