Merge pull request #493 from rookisbusy/Alpha

fix: tun warn timeout
This commit is contained in:
rookisbusy 2023-04-09 19:03:10 +08:00 committed by GitHub
commit 9e6b4dca97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,6 +6,7 @@ import (
"io"
"net"
"net/netip"
"os"
"sync"
"time"
@ -117,7 +118,8 @@ func (h *ListenerHandler) NewPacketConnection(ctx context.Context, conn network.
dest, err := conn.ReadPacket(buff)
if err != nil {
buff.Release()
if E.IsClosed(err) {
// ignore simple error
if err == os.ErrDeadlineExceeded || E.IsClosed(err) {
break
}
return err