fix: close the SSH channel when a Dokku command is finished

This commit is contained in:
James Murdza 2024-12-31 18:22:25 -08:00
parent 182d527416
commit a41cdff55f

View File

@ -89,10 +89,13 @@ export class SSHSocketClient {
)
})
.on("data", (data: Buffer) => {
// Netcat remains open until it is closed, so we close the connection once we receive data.
resolve(data.toString())
stream.close()
})
.stderr.on("data", (data: Buffer) => {
reject(new Error(data.toString()))
stream.close()
})
}
)