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

Race condition in Socket.open #84

Open
jonrimmer opened this issue Mar 24, 2014 · 3 comments
Open

Race condition in Socket.open #84

jonrimmer opened this issue Mar 24, 2014 · 3 comments

Comments

@jonrimmer
Copy link

I am using wasync to connect using websocket to an Atmosphere server that, while developing, is on the same machine. I kept getting timeouts when trying to open the wasync socket, but my logging indicated that a request was being made to the Atmosphere handler, and when I added a breakpoint into the handler to try and diagnose the problem, it stopped happening.

Eventually I discovered that adding a Thread.sleep delay in the Atmosphere handler's processing of the GET request fixed the problem. It seems that wasync has a race condition in its connection code that means it cannot handle situations where the server responds very quickly to the initial request.

@jfarcand
Copy link
Member

Which server are you using for testing it? There is a problem with Netty

@jfarcand
Copy link
Member

Also can you link to a Test case? Or try one of the unit test to see if you can reproduce. Thanks!

@jonrimmer
Copy link
Author

I am using Netty, I guess? I am just using wasync and its default dependencies acquired from Maven Central. I am trying to get a reduced test case, but it's proving a little difficult to disentangle from our application code.

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

No branches or pull requests

2 participants