Fix panic
This commit is contained in:
parent
bca2dabbb7
commit
69db192f6c
1 changed files with 3 additions and 1 deletions
|
|
@ -99,7 +99,9 @@ func NewSSHSessionWithDelayedTimeout(ctx context.Context, timeout time.Duration,
|
|||
go func() {
|
||||
select {
|
||||
case <-time.After(timeout):
|
||||
if preTimeout != nil {
|
||||
preTimeout()
|
||||
}
|
||||
timedOut = true
|
||||
_ = sc.Close()
|
||||
case <-done:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue