Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some unit tests in connection were showing a race condition (see rabb…
…itmq#31): These ones were the ones testing Open scenarios. The issue is that Open and Close, rwc.Open and rwc.Close can at the same time write on: c.allocator = newAllocator(1, c.Config.ChannelMax) connection.go line 444 and connection.go line 849 while shutdown is protected by the structure mutex m, OpenComplete() is not causing the race. Not sure if the library should be protected in this case adding Lock also in OpenComplete(). In any case the tests were just testing Open, so the rwc.Close() can be moved in the main function at the end avoiding the race and not affected the test functionality
- Loading branch information