forked from rabbitmq/amqp091-go
-
Notifications
You must be signed in to change notification settings - Fork 0
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. While it's not clear if the library should protect this eventuality, the tests are testing the Open function, so I think the close can be put in the main thread avoiding the race and not affecting the test validity
- Loading branch information
Daniele Palaia
committed
Mar 25, 2022
1 parent
d25e3e5
commit 3b21050
Showing
1 changed file
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters