From f4414566d347fa006996b864fe5af35a96e1935c Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Tue, 17 Jan 2023 10:41:51 +0800 Subject: [PATCH] fix: tuic server's SetCongestionController --- transport/tuic/server.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/transport/tuic/server.go b/transport/tuic/server.go index 77d99322..5968e3e1 100644 --- a/transport/tuic/server.go +++ b/transport/tuic/server.go @@ -54,6 +54,7 @@ func (s *Server) Serve() error { if err != nil { return err } + SetCongestionController(conn, s.CongestionController) uuid, err := uuid.NewV4() if err != nil { return err @@ -73,7 +74,6 @@ func (s *Server) Close() error { } type serverHandler struct { - serverOption ServerOption *Server quicConn quic.Connection uuid uuid.UUID @@ -167,7 +167,6 @@ func (s *serverHandler) handleStream() (err error) { if err != nil { return err } - SetCongestionController(s.quicConn, s.CongestionController) go func() (err error) { stream := &quicStreamConn{ Stream: quicStream, @@ -215,7 +214,6 @@ func (s *serverHandler) handleUniStream() (err error) { if err != nil { return err } - SetCongestionController(s.quicConn, s.CongestionController) go func() (err error) { defer func() { stream.CancelRead(0)