mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 09:49:28 +08:00
change ssh related timeouts from 5s to 4s
This commit is contained in:
@@ -392,14 +392,14 @@ func (h *Hub) createSSHClientConfig() error {
|
|||||||
ssh.PublicKeys(signer),
|
ssh.PublicKeys(signer),
|
||||||
},
|
},
|
||||||
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
|
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
|
||||||
Timeout: 5 * time.Second,
|
Timeout: 4 * time.Second,
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetches system stats from the agent and decodes the json data into the provided struct
|
// Fetches system stats from the agent and decodes the json data into the provided struct
|
||||||
func (h *Hub) requestJsonFromAgent(client *ssh.Client, systemData *system.CombinedData) error {
|
func (h *Hub) requestJsonFromAgent(client *ssh.Client, systemData *system.CombinedData) error {
|
||||||
session, err := newSessionWithTimeout(client, 5*time.Second)
|
session, err := newSessionWithTimeout(client, 4*time.Second)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("bad client")
|
return fmt.Errorf("bad client")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user