Fix darwin batch loop not exit on EBADF
This commit is contained in:
parent
90ea7a0b69
commit
c81ce6d358
2 changed files with 5 additions and 2 deletions
|
|
@ -269,7 +269,7 @@ func (s *System) batchLoopDarwin(darwinTUN DarwinTUN) {
|
|||
for {
|
||||
buffers, err := darwinTUN.BatchRead()
|
||||
if err != nil {
|
||||
if E.IsClosed(err) {
|
||||
if E.IsClosed(err) || errors.Is(err, syscall.EBADF) {
|
||||
return
|
||||
}
|
||||
s.logger.Error(E.Cause(err, "batch read packet"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue