Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Save/Restore the last used endpoint ids to avoid collisions.
Endpoint ids are assigned in increasing order, and used to avoid deadlocks when acquiring locks. Previously, we were not saving the last used endpoint id, so the ids would always start at 0 again after a Restore, which could lead to collisions with existing endpoints. This CL makes lastID a global, and each connectionedEndpoint saves/loads it. It is a bit redundant to have each connectiondEndpoint do this work, but the value of lastID will be the same for each, so it shouldn't hurt. If there are no saved connectionedEndpoints, then starting the counter over again at 0 makes no difference. PiperOrigin-RevId: 148900024
- Loading branch information