File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -306,13 +306,23 @@ func (rq *removalQueue) checkPending() {
306306 }
307307
308308 if len (toRemove ) > 0 {
309+ defer func () {
310+ if err := recover (); err != nil {
311+ rq .logger .Error ("panic during outbound/endpoint removal" , "error" , err )
312+ }
313+ }()
309314 rq .mu .Lock ()
310315 defer rq .mu .Unlock ()
311316 for _ , tag := range toRemove {
312317 item , exists := rq .pending [tag ]
313318 if ! exists {
314319 continue
315320 }
321+ // double check if outbound/endpoint still exists
322+ if _ , exists = rq .outMgr .Outbound (tag ); ! exists {
323+ rq .logger .Trace ("outbound already removed" , "tag" , tag )
324+ continue
325+ }
316326 rq .logger .Debug ("removing outbound" , "tag" , tag )
317327 if item .isEndpoint {
318328 rq .epMgr .Remove (tag )
You can’t perform that action at this time.
0 commit comments