fix: keep load test websocket sessions alive
This commit is contained in:
@@ -25,6 +25,7 @@ type Config struct {
|
||||
PrepareWorkers int `json:"prepare_workers"`
|
||||
ConnectRamp string `json:"connect_ramp"`
|
||||
CommandTimeout string `json:"command_timeout"`
|
||||
WSPingInterval string `json:"ws_ping_interval"`
|
||||
P2PMessages int `json:"p2p_messages_per_user"`
|
||||
P2PInterval string `json:"p2p_interval"`
|
||||
DrainP2P string `json:"drain_p2p"`
|
||||
@@ -62,6 +63,12 @@ func loadConfig(path string) (*Config, error) {
|
||||
if cfg.CommandTimeout == "" {
|
||||
cfg.CommandTimeout = "20s"
|
||||
}
|
||||
if cfg.WSPingInterval == "" {
|
||||
cfg.WSPingInterval = "20s"
|
||||
}
|
||||
if _, err = configDuration(cfg.WSPingInterval); err != nil {
|
||||
return nil, fmt.Errorf("ws_ping_interval: %w", err)
|
||||
}
|
||||
if cfg.P2PMessages <= 0 {
|
||||
cfg.P2PMessages = 10
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user