mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Remove NICs on stack shutdown to ensure qdisc cleanup.
PiperOrigin-RevId: 424149803
This commit is contained in:
committed by
gVisor bot
parent
f3ff82093e
commit
434e58d261
@@ -1530,9 +1530,13 @@ func (s *Stack) Wait() {
|
||||
p.Wait()
|
||||
}
|
||||
|
||||
s.mu.RLock()
|
||||
defer s.mu.RUnlock()
|
||||
for _, n := range s.nics {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
|
||||
for id, n := range s.nics {
|
||||
// Remove NIC to ensure that qDisc goroutines are correctly
|
||||
// terminated on stack teardown.
|
||||
s.removeNICLocked(id)
|
||||
n.NetworkLinkEndpoint.Wait()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user