This commit is contained in:
JackDoan
2026-05-22 08:52:37 -05:00
parent aff46ce762
commit c610b712af
15 changed files with 202 additions and 381 deletions
+11
View File
@@ -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...)
}