diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js
index 721cdde142519c..83a0f109939dc5 100644
--- a/lib/_tls_wrap.js
+++ b/lib/_tls_wrap.js
@@ -66,12 +66,8 @@ function loadSession(self, hello, cb) {
if (!self._handle)
return cb(new Error('Socket is closed'));
- // NOTE: That we have disabled OpenSSL's internal session storage in
- // `node_crypto.cc` and hence its safe to rely on getting servername only
- // from clienthello or this place.
- var ret = self._handle.loadSession(session);
-
- cb(null, ret);
+ self._handle.loadSession(session);
+ cb(null);
}
if (hello.sessionId.length <= 0 ||
@@ -148,7 +144,7 @@ function requestOCSP(self, hello, ctx, cb) {
function onclienthello(hello) {
var self = this;
- loadSession(self, hello, function(err, session) {
+ loadSession(self, hello, function(err) {
if (err)
return self.destroy(err);
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index f84d42f2321ab9..748d6ad375b4af 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -1822,17 +1822,6 @@ void SSLWrap::LoadSession(const FunctionCallbackInfo& args) {
if (w->next_sess_ != nullptr)
SSL_SESSION_free(w->next_sess_);
w->next_sess_ = sess;
-
- Local