mirror of
https://github.com/chainreactors/spray.git
synced 2025-06-21 18:30:49 +00:00
fix checkpool time not work
This commit is contained in:
parent
a942bac337
commit
7693b4d38f
@ -47,8 +47,8 @@ func NewClient(config *ClientConfig) *Client {
|
|||||||
MaxConnsPerHost: config.Thread * 3 / 2,
|
MaxConnsPerHost: config.Thread * 3 / 2,
|
||||||
MaxIdleConnDuration: config.Timeout,
|
MaxIdleConnDuration: config.Timeout,
|
||||||
//MaxConnWaitTimeout: time.Duration(timeout) * time.Second,
|
//MaxConnWaitTimeout: time.Duration(timeout) * time.Second,
|
||||||
ReadTimeout: config.Timeout * time.Second,
|
ReadTimeout: config.Timeout,
|
||||||
WriteTimeout: config.Timeout * time.Second,
|
WriteTimeout: config.Timeout,
|
||||||
ReadBufferSize: 16384, // 16k
|
ReadBufferSize: 16384, // 16k
|
||||||
MaxResponseBodySize: int(DefaultMaxBodySize),
|
MaxResponseBodySize: int(DefaultMaxBodySize),
|
||||||
NoDefaultUserAgentHeader: true,
|
NoDefaultUserAgentHeader: true,
|
||||||
|
@ -97,7 +97,7 @@ type OutputOptions struct {
|
|||||||
|
|
||||||
type RequestOptions struct {
|
type RequestOptions struct {
|
||||||
Method string `short:"x" long:"method" default:"GET" description:"String, request method, e.g.: --method POST" config:"method"`
|
Method string `short:"x" long:"method" default:"GET" description:"String, request method, e.g.: --method POST" config:"method"`
|
||||||
Headers []string `long:"header" description:"Strings, custom headers, e.g.: --headers 'Auth: example_auth'" config:"headers"`
|
Headers []string `long:"header" description:"Strings, custom headers, e.g.: --header 'Auth: example_auth'" config:"headers"`
|
||||||
UserAgent string `long:"user-agent" description:"String, custom user-agent, e.g.: --user-agent Custom" config:"useragent"`
|
UserAgent string `long:"user-agent" description:"String, custom user-agent, e.g.: --user-agent Custom" config:"useragent"`
|
||||||
RandomUserAgent bool `long:"random-agent" description:"Bool, use random with default user-agent" config:"random-useragent"`
|
RandomUserAgent bool `long:"random-agent" description:"Bool, use random with default user-agent" config:"random-useragent"`
|
||||||
Cookie []string `long:"cookie" description:"Strings, custom cookie" config:"cookies"`
|
Cookie []string `long:"cookie" description:"Strings, custom cookie" config:"cookies"`
|
||||||
|
@ -26,7 +26,7 @@ func NewCheckPool(ctx context.Context, config *Config) (*CheckPool, error) {
|
|||||||
client: ihttp.NewClient(&ihttp.ClientConfig{
|
client: ihttp.NewClient(&ihttp.ClientConfig{
|
||||||
Thread: config.Thread,
|
Thread: config.Thread,
|
||||||
Type: config.ClientType,
|
Type: config.ClientType,
|
||||||
Timeout: time.Duration(config.Timeout) * time.Second,
|
Timeout: config.Timeout,
|
||||||
ProxyAddr: config.ProxyAddr,
|
ProxyAddr: config.ProxyAddr,
|
||||||
}),
|
}),
|
||||||
wg: &sync.WaitGroup{},
|
wg: &sync.WaitGroup{},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user