mirror of
https://github.com/chainreactors/spray.git
synced 2025-09-15 11:40:13 +00:00
调整client中并发池的大小为-t的1.5倍, 优化性能
This commit is contained in:
parent
679b0a129d
commit
da714a1fcc
@ -50,7 +50,7 @@ func NewClient(thread int, timeout int, clientType int) *Client {
|
|||||||
Renegotiation: tls.RenegotiateOnceAsClient,
|
Renegotiation: tls.RenegotiateOnceAsClient,
|
||||||
InsecureSkipVerify: true,
|
InsecureSkipVerify: true,
|
||||||
},
|
},
|
||||||
MaxConnsPerHost: thread,
|
MaxConnsPerHost: thread * 3 / 2,
|
||||||
IdleConnTimeout: time.Duration(timeout) * time.Second,
|
IdleConnTimeout: time.Duration(timeout) * time.Second,
|
||||||
},
|
},
|
||||||
Timeout: time.Second * time.Duration(timeout),
|
Timeout: time.Second * time.Duration(timeout),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user