Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race between outbound messages and peer disconnection
Previously, outbound messages held in `process_events` could race with peer disconnection, allowing a message intended for a peer before disconnection to be sent to the same peer after disconnection. The fix is simple - hold the peers read lock while we fetch pending messages from peers (as we disconnect with the write lock).
- Loading branch information