Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
transport: Test for released messages earlier
This moves the check for released messages earlier in the Release() call for transport messages. This prevents triggering the race detector, due to the check happening before an attempt is made at accessing the message (which involves indirection through a segment that may have been released already). While the prior code would not have actually caused a fault in current code (because the conditional checks both for the released flag and whether the message is nil), checking by the release flag first is more correct and may prevent future bugs.
- Loading branch information