mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-01 01:44:15 +00:00
Add limit check
This commit is contained in:
parent
c55beec5a9
commit
824217cacc
1 changed files with 4 additions and 2 deletions
|
@ -114,8 +114,10 @@ func NewHandler(ctx context.Context, config *core.OutboundHandlerConfig) (outbou
|
||||||
|
|
||||||
if h.senderSettings != nil && h.senderSettings.MultiplexSettings != nil {
|
if h.senderSettings != nil && h.senderSettings.MultiplexSettings != nil {
|
||||||
if config := h.senderSettings.MultiplexSettings; config.Enabled {
|
if config := h.senderSettings.MultiplexSettings; config.Enabled {
|
||||||
MaxReuseTimes := uint32(65535) // as many as possible
|
// MaxReuseTimes use 65535 as default, and it also means the upper limit of MaxReuseTimes
|
||||||
if config.MaxReuseTimes != 0 {
|
// Because in mux cool spec, connection ID is 2 bytes
|
||||||
|
MaxReuseTimes := uint32(65535)
|
||||||
|
if config.MaxReuseTimes != 0 && config.MaxReuseTimes < 65535 {
|
||||||
MaxReuseTimes = uint32(config.MaxReuseTimes)
|
MaxReuseTimes = uint32(config.MaxReuseTimes)
|
||||||
}
|
}
|
||||||
if config.Concurrency < 0 {
|
if config.Concurrency < 0 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue