Close SSH even if RPC Close fails
This commit is contained in:
parent
57d04dc5f0
commit
40886479ae
1 changed files with 1 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ type Session struct {
|
|||
// is no longer active.
|
||||
func (s *Session) Close() error {
|
||||
if err := s.rpc.Close(); err != nil {
|
||||
s.ssh.Close() // close SSH and ignore error
|
||||
return fmt.Errorf("failed to close RPC conn: %w", err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue