Commit 8b015fa
committed
xds/xdsdepmgr: skip unsubscribeFromCluster after Close
The unsubscribe closure returned by SubscribeToCluster is wrapped in
sync.OnceFunc and may run from the balancer tree Close after
DependencyManager.Close has already torn everything down and dropped
m.watcher. Before this change, the post-Close invocation reached
maybeSendUpdateLocked and panicked on m.watcher.Update.
Add an m.stopped guard at the top of unsubscribeFromCluster to match
the pattern used by every other post-Close callback in this file.
Restores the test/xds suite that started failing after 80dac1c.1 parent 80dac1c commit 8b015fa
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1005 | 1005 | | |
1006 | 1006 | | |
1007 | 1007 | | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
1008 | 1015 | | |
1009 | 1016 | | |
1010 | 1017 | | |
| |||
0 commit comments