mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
tls: fix tls handshake check in ssl error
In ssl.onerror event, `this` refers `ssl` so that `this._secureEstablished` is always undefined. Fix it to refer TLSSocket. PR-URL: https://github.com/nodejs/io.js/pull/1661 Reviewed-By: Fedor Indutny <fedor@indutny.com>
This commit is contained in:
1 parent
d4726cde57
commit
e008e8faba
1 file changed
+1
-1
+1
-1
@@ -362,7 +362,7 @@ TLSSocket.prototype._init = function(socket, wrap) {
|
||||
self._writableState.errorEmitted = true;
|
||||
|
||||
// Destroy socket if error happened before handshake's finish
|
||||
if (!this._secureEstablished) {
|
||||
if (!self._secureEstablished) {
|
||||
self._tlsError(err);
|
||||
self.destroy();
|
||||
} else if (options.isServer &&
|
||||
|
||||
Reference in new issue
Block a user