Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

tls, https: add tls handshake timeout #4383

Closed
wants to merge 1 commit into from

Conversation

bnoordhuis
Copy link
Member

Don't allow connections to stall indefinitely if the SSL/TLS handshake does
not complete.

Adds a new tls.Server and https.Server configuration option, handshakeTimeout.

Fixes #4355.

Reviewers: @indutny @piscisaureus?

Don't allow connections to stall indefinitely if the SSL/TLS handshake does
not complete.

Adds a new tls.Server and https.Server configuration option, handshakeTimeout.

Fixes nodejs#4355.
@indutny
Copy link
Member

indutny commented Dec 6, 2012

LGTM

@bnoordhuis bnoordhuis closed this Dec 6, 2012
@bnoordhuis
Copy link
Member Author

Landed in 5b65638.

@tangxinfa
Copy link

I use node.js v0.11.14, tls.Server not automatic close the underlaying tcp socket when handshake timeouted(https.Server and spdy.Server look's not have this problem), this caused my server has 60K dead tcp connections finally, to fix this problem you need destroy socket in the clientError event handler:

    tlsServer.on('clientError', function (exception, socket) {
        socket.destroy();
    });

Hopes this can help somebody.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants