fix: gvisor panic

This commit is contained in:
Meta 2022-04-25 18:21:50 +08:00
parent e4fb10faf9
commit ffb49ba4c5

View file

@ -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),