Skip to content

Commit

Permalink
Don't crash tunnels on: failed to sufficiently increase receive buffe…
Browse files Browse the repository at this point in the history
…r size
  • Loading branch information
kvz committed Nov 6, 2023
1 parent 34f94d5 commit 98d0142
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions test/tunnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,18 @@ module.exports = ({ cloudFlaredPath = 'cloudflared', port }) => {
)
})

rl.on('close', () => {
process.kill()
throw new Error(`Failed to create tunnel. Closed unexpectedly. Full stderr: ${fullStderr}`)
})
// rl.on('close', () => {
// process.kill()
// throw new Error(`Failed to create tunnel. Closed unexpectedly. Full stderr: ${fullStderr}`)
// })

rl.on('line', (line) => {
debug(line)
fullStderr += `${line}\n`
if (line.includes('failed')) {
if (
line.includes('failed') &&
!line.includes('failed to sufficiently increase receive buffer size')
) {
process.kill()
throw new Error(
`Failed to create tunnel. There was an error string in the stderr: ${line}`
Expand Down

0 comments on commit 98d0142

Please sign in to comment.