Update quic-go to v0.58.0
This commit is contained in:
@@ -88,7 +88,7 @@ func (s *Server) streamAcceptLoop(conn *quic.Conn) error {
|
||||
for {
|
||||
stream, err := conn.AcceptStream(s.ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
return qtls.WrapError(err)
|
||||
}
|
||||
go s.handler.NewConnectionEx(conn.Context(), &StreamWrapper{Conn: conn, Stream: stream}, M.SocksaddrFromNet(conn.RemoteAddr()), M.Socksaddr{}, nil)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"net"
|
||||
|
||||
"github.com/sagernet/quic-go"
|
||||
"github.com/sagernet/sing/common/baderror"
|
||||
qtls "github.com/sagernet/sing-quic"
|
||||
)
|
||||
|
||||
type StreamWrapper struct {
|
||||
@@ -14,14 +14,12 @@ type StreamWrapper struct {
|
||||
|
||||
func (s *StreamWrapper) Read(p []byte) (n int, err error) {
|
||||
n, err = s.Stream.Read(p)
|
||||
//nolint:staticcheck
|
||||
return n, baderror.WrapQUIC(err)
|
||||
return n, qtls.WrapError(err)
|
||||
}
|
||||
|
||||
func (s *StreamWrapper) Write(p []byte) (n int, err error) {
|
||||
n, err = s.Stream.Write(p)
|
||||
//nolint:staticcheck
|
||||
return n, baderror.WrapQUIC(err)
|
||||
return n, qtls.WrapError(err)
|
||||
}
|
||||
|
||||
func (s *StreamWrapper) LocalAddr() net.Addr {
|
||||
|
||||
Reference in New Issue
Block a user