Merge pull request #493 from rookisbusy/Alpha

fix: tun warn timeout
This commit is contained in:
gVisor bot 2023-04-09 19:03:10 +08:00
commit bf0bdfbf7d

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