Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mutex lock to updateServer (linkerd#11169)
Fixes linkerd#11163 The `servicePublisher.updateServer` function will iterate through all registered listeners and update them. However, a nil listener may temporarily be in the list of listeners if an unsubscribe is in progress. This results in a nil pointer dereference. All functions which result in updating the listeners must therefore be protected by the mutex so that we don't try to act on the list of listeners while it is being modified. Signed-off-by: Alex Leong <[email protected]>
- Loading branch information