Skip to content

Commit

Permalink
tls: fix references to undefined cb
Browse files Browse the repository at this point in the history
5795e83 introduced unintentional
copy-paste bug. `cb` is not actually present in those functions and
should not be called, the socket should be destroy instead.

PR-URL: #1951
Reviewed-By: Roman Reiss <me@silverwind.io>
  • Loading branch information
indutny committed Jun 11, 2015
1 parent 0f68377 commit 8732977
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/_tls_wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function oncertcb(info) {
return self.destroy(err);

if (!self._handle)
return cb(new Error('Socket is closed'));
return self.destroy(new Error('Socket is closed'));

self._handle.certCbDone();
});
Expand All @@ -192,7 +192,7 @@ function onnewsession(key, session) {
once = true;

if (!self._handle)
return cb(new Error('Socket is closed'));
return self.destroy(new Error('Socket is closed'));

self._handle.newSessionDone();

Expand Down

0 comments on commit 8732977

Please sign in to comment.