mirror of https://github.com/nodejs/node.git
Inline timeout function, avoiding declaration in conditional
Moving it out would require an anonymous function, or bind(), anyway. Luckily It's a tiny function. Fixes crash in strict mode.pull/24503/head
parent
7e7d5d38ea
commit
4cfdc57712
|
@ -574,11 +574,10 @@ function onhandshakestart() {
|
||||||
var self = this, ssl = this.ssl;
|
var self = this, ssl = this.ssl;
|
||||||
|
|
||||||
if (ssl.timer === null) {
|
if (ssl.timer === null) {
|
||||||
function timeout() {
|
ssl.timer = setTimeout(function timeout() {
|
||||||
ssl.handshakes = 0;
|
ssl.handshakes = 0;
|
||||||
ssl.timer = null;
|
ssl.timer = null;
|
||||||
}
|
}, exports.CLIENT_RENEG_WINDOW * 1000);
|
||||||
ssl.timer = setTimeout(timeout, exports.CLIENT_RENEG_WINDOW * 1000);
|
|
||||||
}
|
}
|
||||||
else if (++ssl.handshakes > exports.CLIENT_RENEG_LIMIT) {
|
else if (++ssl.handshakes > exports.CLIENT_RENEG_LIMIT) {
|
||||||
// Defer the error event to the next tick. We're being called from OpenSSL's
|
// Defer the error event to the next tick. We're being called from OpenSSL's
|
||||||
|
|
Loading…
Reference in New Issue