Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@0x08
Copy link
Contributor

@0x08 0x08 commented Dec 21, 2015

This fixes a race condition between the calling thread and the SocketThread.

It was possible that once the request had been written, the response was coming back before the "this.asyncResult = null" (line 258) statement was being called. This was causing a valid response to be lost and "null" being returned. This fix first checks to ensure no response has been received yet, and only then to wait for a second at most for a response.

…Thread.

It was possible that once the request had been written, the response was coming back before the "this.asyncResult = null" (line 258) statement was being called. This was causing a valid response to be lost and "null" being returned. This fix first checks to ensure no response has been received yet, and only then to wait for a second at most for a response.
@hoegertn
Copy link
Member

Thank you very much

hoegertn added a commit that referenced this pull request Dec 22, 2015
race condition between calling thread and SocketThread
@hoegertn hoegertn merged commit 6f2bc17 into taimos:master Dec 22, 2015
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.

2 participants