-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pw_rpc: Fix Call not getting reset on default constructor assignment
When trying to reinitialize an already used Call object to default, the move constructor runs but ends up exiting early before actually resetting the call internal state due to this conditional: if (!other.active_locked()) { return; // Nothing else to do; this call is already closed. } A default Call has state_ initialized to 0, so active_locked() returns false so none of the assignments happen on `this`. We fix this by letting the bulk of the move assignments happen regardless of active state, except for those parts that apply specifically to active calls. Bug: 371211198 Change-Id: I8cb18d06bd91db41822937a57b31351049678222 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/239718 Docs-Not-Needed: Austin Foxley <afoxley@google.com> Commit-Queue: Austin Foxley <afoxley@google.com> Reviewed-by: Wyatt Hepler <hepler@google.com> Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
- Loading branch information
Showing
3 changed files
with
17 additions
and
10 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