Fangliding před 9 měsíci
rodič
revize
824217cacc
1 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. 4 2
      app/proxyman/outbound/handler.go

+ 4 - 2
app/proxyman/outbound/handler.go

@@ -114,8 +114,10 @@ func NewHandler(ctx context.Context, config *core.OutboundHandlerConfig) (outbou
 
 	if h.senderSettings != nil && h.senderSettings.MultiplexSettings != nil {
 		if config := h.senderSettings.MultiplexSettings; config.Enabled {
-			MaxReuseTimes := uint32(65535) // as many as possible
-			if config.MaxReuseTimes != 0 {
+			// MaxReuseTimes use 65535 as default, and it also means the upper limit of MaxReuseTimes
+			// Because in mux cool spec, connection ID is 2 bytes
+			MaxReuseTimes := uint32(65535)
+			if config.MaxReuseTimes != 0 && config.MaxReuseTimes < 65535 {
 				MaxReuseTimes = uint32(config.MaxReuseTimes)
 			}
 			if config.Concurrency < 0 {