mirror of
https://github.com/slackhq/nebula.git
synced 2026-07-02 03:20:29 +02:00
it works
This commit is contained in:
@@ -62,6 +62,10 @@ func (c *offloadQueueSet) wakeForShutdown() error {
|
||||
}
|
||||
|
||||
func (c *offloadQueueSet) Close() error {
|
||||
if c.shutdownFd < 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
errs := []error{}
|
||||
|
||||
// Signal all readers blocked in poll to wake up and exit
|
||||
@@ -75,5 +79,12 @@ func (c *offloadQueueSet) Close() error {
|
||||
}
|
||||
}
|
||||
|
||||
// All Offloads reference shutdownFd in their pollfd arrays, so close it
|
||||
// only after every Offload.Close has returned.
|
||||
if err := unix.Close(c.shutdownFd); err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
c.shutdownFd = -1
|
||||
|
||||
return errors.Join(errs...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user