[CastMRP] Fix a couple of bugs in CMSSImpl.
- On channel error, erase the sink from |current_sinks_map|. crrev.com/541271 added a check in OpenChannel() to short circuit if a sink already exists on the map. In order for retry on error to kick in properly, we will need to erase the entry in OnError(). - In OnChannelOpenSucceeded, erase stale sink with the same IP. This is done to maintain the invariant of having at most 1 sink of a given ID in the map. Stale sink is defined as having the same sink ID but different IP endpoint than the current one. - In OnChannelOpenFailed, when erasing the sink from |current_sinks_map_|, also verify the sink ID. It is possible that a different sink now occcupies the IP endpoint that it is trying to erase. Change-Id: I12bfd5af5f664c4773e7587dc30c6709d2352021 Bug: 698940 Reviewed-on: https://chromium-review.googlesource.com/961555Reviewed-by:Bin Zhao <zhaobin@chromium.org> Commit-Queue: Derek Cheng <imcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#543439}
Showing
Please register or sign in to comment