Skip to content

Commit 0beb8d3

Browse files
committed
fix: use int32_t for the socket type
1 parent 9546fcc commit 0beb8d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/socket.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Socket::Socket(const Napi::CallbackInfo& info)
7676
return;
7777
}
7878

79-
type = info[0].As<Napi::Number>().Uint32Value();
79+
type = info[0].As<Napi::Number>().Int32Value();
8080

8181
if (info[1].IsObject()) {
8282
auto options = info[1].As<Napi::Object>();

src/socket.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class Socket : public Napi::ObjectWrap<Socket>, public Closable {
112112
State state = State::Open;
113113
bool request_close = false;
114114
bool thread_safe = false;
115-
uint8_t type = 0;
115+
int type = 0;
116116

117117
friend class Observer;
118118
friend class Proxy;

0 commit comments

Comments
 (0)