mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-29 21:45:21 -05:00
split worker picker from client manager
This commit is contained in:
@@ -72,7 +72,16 @@ func NewHandler(ctx context.Context, config *core.OutboundHandlerConfig) (outbou
|
||||
if config.Concurrency < 1 || config.Concurrency > 1024 {
|
||||
return nil, newError("invalid mux concurrency: ", config.Concurrency).AtWarning()
|
||||
}
|
||||
h.mux = mux.NewClientManager(proxyHandler, h, config.Concurrency)
|
||||
h.mux = &mux.ClientManager{
|
||||
Picker: &mux.IncrementalWorkerPicker{
|
||||
New: func() (*mux.ClientWorker, error) {
|
||||
return mux.NewClientWorker(proxyHandler, h, mux.ClientStrategy{
|
||||
MaxConcurrency: config.Concurrency,
|
||||
MaxConnection: 128,
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
h.proxy = proxyHandler
|
||||
|
||||
Reference in New Issue
Block a user