change ssh related timeouts from 5s to 4s

This commit is contained in:
Henry Dollman
2024-11-15 16:29:36 -05:00
parent e6839480d9
commit a1641c5bcc

View File

@@ -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")
} }