Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a race condition in socket constructor.
There was a race where the socket connect callbacks could get called before the socket was added to the global cache. Then, in the callback, the socket would try to be retrieved from the cache, but it wouldn't be there, resulting in an error. This was a pretty bad race, and it affected real code. This was brought up on #40 by GitHub user chaoflow. Many thanks to him for identifying the fix!
- Loading branch information