Skip to content

Commit bbdd3d3

Browse files
Try this
1 parent 5d15b9e commit bbdd3d3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/WebSocketWrapper.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ struct WebSocketWrapper {
328328
template <bool SSL>
329329
static uint32_t uWS_WebSocket_send_fast(v8::Local<v8::Object> receiver, const v8::FastOneByteString& message, bool isBinary, bool compress, v8::FastApiCallbackOptions& options) {
330330
auto *ws = (uWS::WebSocket<SSL, true, PerSocketData> *) receiver->GetAlignedPointerFromInternalField(0);
331-
if (!ws) { options.fallback = true; return 0; }
331+
if (!ws) { return 0; }
332332
return ws->send(std::string_view((char *) message.data, message.length),
333333
isBinary ? uWS::OpCode::BINARY : uWS::OpCode::TEXT, compress);
334334
}
@@ -349,7 +349,7 @@ struct WebSocketWrapper {
349349
wsTemplateLocal->PrototypeTemplate()->Set(String::NewFromUtf8(isolate, "sendLastFragment", NewStringType::kNormal).ToLocalChecked(), FunctionTemplate::New(isolate, uWS_WebSocket_sendLastFragment<SSL>));
350350

351351
wsTemplateLocal->PrototypeTemplate()->Set(String::NewFromUtf8(isolate, "getUserData", NewStringType::kNormal).ToLocalChecked(), FunctionTemplate::New(isolate, uWS_WebSocket_getUserData<SSL>));
352-
static v8::CFunction fast_send = v8::CFunction::MakeWithFallbackSupport(uWS_WebSocket_send_fast<SSL>);
352+
static v8::CFunction fast_send = v8::CFunction::Make(uWS_WebSocket_send_fast<SSL>);
353353
wsTemplateLocal->PrototypeTemplate()->Set(String::NewFromUtf8(isolate, "send", NewStringType::kNormal).ToLocalChecked(), FunctionTemplate::New(isolate, uWS_WebSocket_send<SSL>, Local<Value>(), Local<Signature>(), 0, ConstructorBehavior::kAllow, SideEffectType::kHasSideEffect, &fast_send));
354354
wsTemplateLocal->PrototypeTemplate()->Set(String::NewFromUtf8(isolate, "end", NewStringType::kNormal).ToLocalChecked(), FunctionTemplate::New(isolate, uWS_WebSocket_end<SSL>));
355355
wsTemplateLocal->PrototypeTemplate()->Set(String::NewFromUtf8(isolate, "close", NewStringType::kNormal).ToLocalChecked(), FunctionTemplate::New(isolate, uWS_WebSocket_close<SSL>));

0 commit comments

Comments
 (0)