fix(connectionhandler): Delay socket termination in TLS session resumption handling to allow proper alert processing

This commit is contained in:
2025-03-17 13:23:07 +00:00
parent 1611f65455
commit 22f46700f1
3 changed files with 8 additions and 2 deletions

View File

@ -625,10 +625,10 @@ export class ConnectionHandler {
const finishConnection = () => {
// Give Chrome more time to process the alert before closing
// We won't call destroy() at all - just end() and let the socket close naturally
socket.end();
// Log the cleanup but wait for natural closure
setTimeout(() => {
socket.end();
this.connectionManager.cleanupConnection(record, 'session_ticket_blocked_no_sni');
}, 5000); // Longer delay to let socket cleanup happen naturally
};