diff --git a/listener/tun/ipstack/gvisor/tcp.go b/listener/tun/ipstack/gvisor/tcp.go index 61f5d90e..a045d056 100644 --- a/listener/tun/ipstack/gvisor/tcp.go +++ b/listener/tun/ipstack/gvisor/tcp.go @@ -67,6 +67,10 @@ func withTCPHandler(handle adapter.TCPHandleFunc) option.Option { defer r.Complete(false) err = setSocketOptions(s, ep) + if err != nil { + r.Complete(true) + return + } conn := &tcpConn{ TCPConn: gonet.NewTCPConn(&wq, ep),