File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -226,12 +226,22 @@ func (p *Pool) clientRefCountedClose(name string) {
226226 return
227227 }
228228 delete (p .clients , name )
229- p .mu .Unlock ()
230229
231- // This attempts to close the transport to the management server and could
232- // theoretically call back into the xdsclient package again and deadlock.
233- // Hence, this needs to be called without holding the lock.
234230 client .Close ()
231+ for _ , s := range client .config .XDSServers () {
232+ for _ , f := range s .Cleanups () {
233+ f ()
234+ }
235+ }
236+ for _ , a := range client .config .Authorities () {
237+ for _ , s := range a .XDSServers {
238+ for _ , f := range s .Cleanups () {
239+ f ()
240+ }
241+ }
242+ }
243+ p .mu .Unlock ()
244+
235245 xdsClientImplCloseHook (name )
236246}
237247
You can’t perform that action at this time.
0 commit comments