Atmosphere/atmosphere

Push message are not processed randomly

SuperPat45 opened this issue · 1 comments

Describe the bug
I have the same bug described in #1822.
After doing a remote debug, I see the dispatchThread variable of the class DefaultBroadcaster is set on 1, but as I don't log trace messages, so I don't know if they were an interruption and why.

My question is are there any reason why we not call dispatchThread.decrementAndGet() before all the return of this method?
This will prevent this bug.

Wouldn't it be useful to put this log in info instead of trace?

Atmosphere Info

  • version latest
  • atmosphere.js latest

Expected behavior
Always process push messages even if a previous thread was interrupted.

Systems (please complete the following information):

  • OS: Windows 10
  • Browser name and version Firefox 88
  • Java version and distribution JDK11
  • Serveur name and version Wildfly 16

@SuperPat45 Thanks as usual. Can you do a pull request with your solution? I will work on it from there