fix: Add CC for TUIC server
This commit is contained in:
parent
f3b76df13b
commit
db4f3eda55
2 changed files with 4 additions and 1 deletions
|
@ -92,6 +92,7 @@ func ParseListener(mapping map[string]any) (C.InboundListener, error) {
|
|||
AuthenticationTimeout: 1000,
|
||||
ALPN: []string{"h3"},
|
||||
MaxUdpRelayPacketSize: 1500,
|
||||
CongestionController: "bbr",
|
||||
}
|
||||
err = decoder.Decode(mapping, tuicOption)
|
||||
if err != nil {
|
||||
|
|
|
@ -73,6 +73,7 @@ func (s *Server) Close() error {
|
|||
}
|
||||
|
||||
type serverHandler struct {
|
||||
serverOption ServerOption
|
||||
*Server
|
||||
quicConn quic.Connection
|
||||
uuid uuid.UUID
|
||||
|
@ -166,7 +167,7 @@ func (s *serverHandler) handleStream() (err error) {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
SetCongestionController(s.quicConn, s.CongestionController)
|
||||
go func() (err error) {
|
||||
stream := &quicStreamConn{
|
||||
Stream: quicStream,
|
||||
|
@ -214,6 +215,7 @@ 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)
|
||||
|
|
Loading…
Reference in a new issue