Use registered io on Windows when possible (#905)

This commit is contained in:
Nate Brown
2023-07-10 12:43:48 -05:00
committed by GitHub
parent 8ba5d64dbc
commit a3e59a38ef
13 changed files with 472 additions and 8 deletions

View File

@@ -413,6 +413,13 @@ func (f *Interface) emitStats(ctx context.Context, i time.Duration) {
func (f *Interface) Close() error {
f.closed.Store(true)
for _, u := range f.writers {
err := u.Close()
if err != nil {
f.l.WithError(err).Error("Error while closing udp socket")
}
}
// Release the tun device
return f.inside.Close()
}