-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix double-free bugs on failure to send a write message. (#13051)
There were two separate bugs here: 1) For a group write, we were violating the contract for WriteClient::SendWriteRequest, which is that the caller must call Shutdown on failure but the WriteClient itself will do it on success (and call OnDone in the process). We were unconditionally calling Shutdown and OnDone inside SetWriteRequest, even on failure. 2) WriteInteraction was violating the contract for WriteClientHandle::SendWriteRequest, which is different: it always guarantees it will call OnDone. But the consumer was assuming that OnDone would only be called if SendWriteRequest returned success.
- Loading branch information
1 parent
4ca5d31
commit 00c2c17
Showing
3 changed files
with
20 additions
and
7 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