Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing concurrency and thread issues in engine.io #18

Merged
merged 5 commits into from
Dec 2, 2019

Conversation

afkelsall
Copy link
Contributor

Hi,
I spent a few weeks investigating and load testing the engine.io-java server for a project. During this time I found and fixed several issues to do with concurrency, race conditions and the TimerTasks.
In the end I decided not to continue with engine.io but thought I'd push up my fixes that I found.

Hope this helps.

…read safe.

This would cause the server threads to choke when many clients were connecting quickly.
…lient would send a new long poll request too quickly.
@codecov-io
Copy link

Codecov Report

Merging #18 into master will decrease coverage by 0.01%.
The diff coverage is 88.57%.

@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
- Coverage   86.33%   86.31%   -0.02%     
==========================================
  Files          11       12       +1     
  Lines         578      592      +14     
  Branches       89       90       +1     
==========================================
+ Hits          499      511      +12     
- Misses         40       41       +1     
- Partials       39       40       +1

1) Added synchronized to resetPingTimeout method
2) Moved the runnable definition to a final field on socket object
3) Changed the TreeMap wrapped in synchronization to a ConcurrentHashMap
Copy link
Collaborator

@trinopoty trinopoty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@trinopoty trinopoty merged commit bdf69ff into socketio:master Dec 2, 2019
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.

3 participants