Wrap subscribe returned bool

This commit is contained in:
Alex Hultman 2021-04-10 22:47:37 +02:00
parent 08a54d4ba6
commit 53db43250e

View File

@ -50,7 +50,8 @@ struct WebSocketWrapper {
return;
}
bool nonStrict = args.Length() > 1 && args[1]->BooleanValue(isolate);
ws->subscribe(topic.getString(), nonStrict);
bool success = ws->subscribe(topic.getString(), nonStrict);
args.GetReturnValue().Set(Boolean::New(isolate, success));
}
}