Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix MuxHandler initialization race (#1626)
Fix race condition that can occur when calling handlers returned from Controller.MuxHandler where the Service's slice of middleware functions is written to in a way that is not thread-safe. The race will only occur when the capacity of the Service's middleware slice is greater than its length and when the number of Controller middlewares is more than 0. The functions returned by MuxHandler (that are all from the same Controller object), if called in parallel, could cause the race to occur.
- Loading branch information
Showing
3 changed files
with
47 additions
and
2 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
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
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