We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6bda392 + 705e63a commit a527e68Copy full SHA for a527e68
netconf/transport_ssh.go
@@ -38,6 +38,11 @@ type TransportSSH struct {
38
39
// Close closes an existing SSH session and socket if they exist.
40
func (t *TransportSSH) Close() error {
41
+ // If TransportSSH is nil ignore closing ssh session
42
+ if t == nil {
43
+ return nil
44
+ }
45
+
46
// Close the SSH Session if we have one
47
if t.sshSession != nil {
48
if err := t.sshSession.Close(); err != nil {
0 commit comments