Skip to content

Commit c2c8fd5

Browse files
committed
fix: accept v20 SSL specific error for alpn selection in http/2
Signed-off-by: Matteo Collina <[email protected]>
1 parent 82200bd commit c2c8fd5

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test/http2.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,16 @@ test(
402402
}
403403
})
404404
} catch (error) {
405-
t.equal(
406-
error.message,
407-
'Client network socket disconnected before secure TLS connection was established'
405+
t.ok(
406+
error.message === 'Client network socket disconnected before secure TLS connection was established' ||
407+
error.message.includes('SSL routines:ssl3_read_bytes:tlsv1 alert no application protocol'),
408+
`Error message should be as expected: ${error.message}`
409+
)
410+
t.ok(
411+
error.code === 'ECONNRESET' ||
412+
error.code === 'ERR_SSL_TLSV1_ALERT_NO_APPLICATION_PROTOCOL',
413+
`Error code should be as expected: ${error.code}`
408414
)
409-
t.equal(error.code, 'ECONNRESET')
410415
}
411416
}
412417
)

0 commit comments

Comments
 (0)