diff --git a/src/WebSocketWrapper.h b/src/WebSocketWrapper.h index 6e44eb2..0d20c2f 100644 --- a/src/WebSocketWrapper.h +++ b/src/WebSocketWrapper.h @@ -129,8 +129,8 @@ struct WebSocketWrapper { Isolate *isolate = args.GetIsolate(); auto *ws = getWebSocket(args); if (ws) { - int bufferedAmount = ws->getBufferedAmount(); - args.GetReturnValue().Set(Integer::New(isolate, bufferedAmount)); + unsigned int bufferedAmount = ws->getBufferedAmount(); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, bufferedAmount)); } }