()
| 38 | }) |
| 39 | |
| 40 | const close = () => { |
| 41 | try { |
| 42 | client.end() |
| 43 | } catch (error) { |
| 44 | logger.warn('Failed to close SSH session', { error: getErrorMessage(error) }) |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | // The TCP/SSH connection is already open here, so close it if opening the SFTP |
| 49 | // channel fails (e.g. the server has the SFTP subsystem disabled) — otherwise |
no test coverage detected