Skip to content

Commit 45d056e

Browse files
committed
src: fix WITH_GENERIC_STREAM() type check bug
The handle object was checked against the wrong constructor template. Put another way, it was unwrapped as the wrong StreamWrap type.
1 parent 5764966 commit 45d056e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/node_wrap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ extern v8::Persistent<v8::FunctionTemplate> tcpConstructorTmpl;
4040
do { \
4141
if (!tcpConstructorTmpl.IsEmpty() && \
4242
HasInstance(tcpConstructorTmpl, obj)) { \
43-
PipeWrap* wrap = PipeWrap::Unwrap(obj); \
43+
TCPWrap* wrap = TCPWrap::Unwrap(obj); \
4444
BODY \
4545
} else if (!ttyConstructorTmpl.IsEmpty() && \
4646
HasInstance(ttyConstructorTmpl, obj)) { \
4747
TTYWrap* wrap = TTYWrap::Unwrap(obj); \
4848
BODY \
4949
} else if (!pipeConstructorTmpl.IsEmpty() && \
5050
HasInstance(pipeConstructorTmpl, obj)) { \
51-
TCPWrap* wrap = TCPWrap::Unwrap(obj); \
51+
PipeWrap* wrap = PipeWrap::Unwrap(obj); \
5252
BODY \
5353
} \
5454
} while (0)

0 commit comments

Comments
 (0)