fix: listen to the "session" tls event instead of the more ambiguous "secureConnect" that can be triggered before an "error" on TLSv1.3 #6771

This commit is contained in:
Lionel VICTOR 2026-01-19 21:04:20 +01:00
parent f8652c27af
commit 4da6bd4078

View File

@ -353,7 +353,7 @@ class TCPMonitorType extends MonitorType {
reject(new Error("TLS connection timed out")); reject(new Error("TLS connection timed out"));
}, timeout); }, timeout);
socket.on("secureConnect", () => { socket.on("session", () => {
clearTimeout(timeoutId); clearTimeout(timeoutId);
const responseTime = Date.now() - startTime; const responseTime = Date.now() - startTime;