summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy J Fontaine <tjfontaine@gmail.com>2015-03-24 13:30:34 -0700
committerTimothy J Fontaine <tjfontaine@gmail.com>2015-03-24 14:09:17 -0700
commitea56a3690eb436aeaa6254c6850a074a3dde44e7 (patch)
tree8611e74cc812f40e73603be0ba1fd97aead4f4d4
parentc5a03600724a8ae08b2c77920021aa39ff17d5ab (diff)
downloadnode-ea56a3690eb436aeaa6254c6850a074a3dde44e7.tar.gz
tlswrap: don't emit secure twice
-rw-r--r--lib/_tls_wrap.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js
index ac4873fa3..222f00e77 100644
--- a/lib/_tls_wrap.js
+++ b/lib/_tls_wrap.js
@@ -465,6 +465,9 @@ TLSSocket.prototype._finishInit = function() {
this.servername = this.ssl.getServername();
}
+ if (this._secureEstablished)
+ return;
+
debug('secure established');
this._secureEstablished = true;
if (this._tlsOptions.handshakeTimeout > 0)