Skip to content

Commit

Permalink
fix: use int32_t for the socket type
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Oct 22, 2024
1 parent 3dac27e commit 8818a66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Socket::Socket(const Napi::CallbackInfo& info)
return;
}

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

if (info[1].IsObject()) {
auto options = info[1].As<Napi::Object>();
Expand Down
2 changes: 1 addition & 1 deletion src/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class Socket : public Napi::ObjectWrap<Socket>, public Closable {
State state = State::Open;
bool request_close = false;
bool thread_safe = false;
uint8_t type = 0;
int type = 0;

friend class Observer;
friend class Proxy;
Expand Down

0 comments on commit 8818a66

Please sign in to comment.