mirror of
https://github.com/rancher/norman.git
synced 2025-09-12 21:33:21 +00:00
Configure HandshakeTimeout in websocket.Dialer
To prevent agent from being hung in the middle of Websocket Session Handshake, We'd better to set HandshakeTimeout Related to https://github.com/rancher/rancher/issues/21117
This commit is contained in:
@@ -277,7 +277,7 @@ func NewAPIClient(opts *ClientOpts) (APIBaseClient, error) {
|
||||
result.Ops = &APIOperations{
|
||||
Opts: opts,
|
||||
Client: client,
|
||||
Dialer: &websocket.Dialer{},
|
||||
Dialer: &websocket.Dialer{HandshakeTimeout: 10 * time.Second},
|
||||
Types: result.Types,
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user