fix: better ssh resilience and customizable timeout for future backoff
This commit is contained in:
parent
6a0e097412
commit
7f376c3f70
4 changed files with 48 additions and 31 deletions
|
|
@ -50,8 +50,7 @@ func (i *TsWasmIpn) NewSSHSession(hostname, username string, termConfig *SSHXter
|
|||
func (s *SSHSession) ConnectAndRun() {
|
||||
defer s.TermConfig.OnDisconnect()
|
||||
|
||||
// Default to a 5 second timeout for the connection AFTER dial.
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(s.TermConfig.Timeout)*time.Second)
|
||||
defer cancel()
|
||||
|
||||
// TODO: Log here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue