tls: set servername on client side too

PR-URL: https://github.com/nodejs/node/pull/17935
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
This commit is contained in:
James M Snell
2018-01-01 11:13:05 -08:00
parent 30892c8fb4
commit b25b1efa0a

View File

@@ -621,7 +621,7 @@ TLSSocket.prototype._finishInit = function() {
this.alpnProtocol = this._handle.getALPNNegotiatedProtocol();
}
if (process.features.tls_sni && this._tlsOptions.isServer) {
if (process.features.tls_sni) {
this.servername = this._handle.getServername();
}