MCPcopy Index your code
hub / github.com/simstudioai/sim / close

Function close

apps/sim/executor/handlers/pi/ssh-tools.ts:40–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

openSshSessionFunction · 0.70

Calls 2

getErrorMessageFunction · 0.90
warnMethod · 0.65

Tested by

no test coverage detected