don't assume socket._handle exists
This commit is contained in:
parent
bcd332fea1
commit
7da7746a31
8
index.js
8
index.js
|
@ -266,9 +266,9 @@ function extractSocketProps(socket, propNames) {
|
|||
propNames.forEach(function (propName) {
|
||||
props[propName] = socket['_' + propName];
|
||||
});
|
||||
} else if (
|
||||
socket._handle
|
||||
&& socket._handle._parent
|
||||
} else if (socket._handle) {
|
||||
if (
|
||||
socket._handle._parent
|
||||
&& socket._handle._parent.owner
|
||||
&& socket._handle._parent.owner.stream
|
||||
&& socket._handle._parent.owner.stream.remotePort
|
||||
|
@ -278,7 +278,6 @@ function extractSocketProps(socket, propNames) {
|
|||
});
|
||||
} else if (
|
||||
socket._handle._parentWrap
|
||||
&& socket._handle._parentWrap
|
||||
&& socket._handle._parentWrap.remotePort
|
||||
) {
|
||||
propNames.forEach(function (propName) {
|
||||
|
@ -295,6 +294,7 @@ function extractSocketProps(socket, propNames) {
|
|||
props[propName] = socket._handle._parentWrap._handle.owner.stream[propName];
|
||||
});
|
||||
}
|
||||
}
|
||||
return props;
|
||||
}
|
||||
function extractSocketProp(socket, propName) {
|
||||
|
|
Loading…
Reference in New Issue