tls: fix references to undefined cb
5795e835a1021abdf803e1460501487adbac8d7c 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: https://github.com/nodejs/io.js/pull/1951 Reviewed-By: Roman Reiss <me@silverwind.io>
This commit is contained in:
parent
0f68377f69
commit
8732977536
@ -167,7 +167,7 @@ function oncertcb(info) {
|
|||||||
return self.destroy(err);
|
return self.destroy(err);
|
||||||
|
|
||||||
if (!self._handle)
|
if (!self._handle)
|
||||||
return cb(new Error('Socket is closed'));
|
return self.destroy(new Error('Socket is closed'));
|
||||||
|
|
||||||
self._handle.certCbDone();
|
self._handle.certCbDone();
|
||||||
});
|
});
|
||||||
@ -192,7 +192,7 @@ function onnewsession(key, session) {
|
|||||||
once = true;
|
once = true;
|
||||||
|
|
||||||
if (!self._handle)
|
if (!self._handle)
|
||||||
return cb(new Error('Socket is closed'));
|
return self.destroy(new Error('Socket is closed'));
|
||||||
|
|
||||||
self._handle.newSessionDone();
|
self._handle.newSessionDone();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user