Skip to content

Commit

Permalink
fix: CTA hanging requests
Browse files Browse the repository at this point in the history
SSH channel was being closed prematurely, sometimes with piped data still pending. this caused large proxy requests to sometimes hang
  • Loading branch information
Roy Razon committed Mar 3, 2024
1 parent ebf926d commit 5e279cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/compose-tunnel-agent/src/ssh/tunnel-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const sshClient = async ({
channel.on('close', () => localServiceSocket.destroy())
localServiceSocket.on('close', () => {
sockets.delete(localServiceSocket)
channel.close()
channel.end() // close the channel, but only after the localServiceSocket data has been piped
})
})
localServiceSocket.on('error', err => {
Expand Down

0 comments on commit 5e279cb

Please sign in to comment.