Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions adapter/groups/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,24 @@ func (rq *removalQueue) checkPending() {
}

if len(toRemove) > 0 {
defer func() {
if err := recover(); err != nil {
rq.logger.Error("panic during outbound/endpoint removal", "error", err)
}
}()
rq.mu.Lock()
defer rq.mu.Unlock()
for _, tag := range toRemove {
item, exists := rq.pending[tag]
if !exists {
continue
}
// double check if outbound/endpoint still exists
if _, exists = rq.outMgr.Outbound(tag); !exists {
rq.logger.Trace("outbound already removed", "tag", tag)
delete(rq.pending, tag)
continue
}
rq.logger.Debug("removing outbound", "tag", tag)
if item.isEndpoint {
rq.epMgr.Remove(tag)
Expand Down
Loading