Add us_listen_socket_close and graceful shutdown example

This commit is contained in:
Alex Hultman 2019-01-18 09:07:21 +01:00
parent ab829af8ce
commit 0fb6ec9034
3 changed files with 49 additions and 4 deletions

View file

@ -160,7 +160,7 @@ void uWS_App_listen(const FunctionCallbackInfo<Value> &args) {
int port = args[0]->Uint32Value(args.GetIsolate()->GetCurrentContext()).ToChecked();
app->listen(port, [&args](auto *token) {
Local<Value> argv[] = {Boolean::New(isolate, token)};
Local<Value> argv[] = {External::New(isolate, token)};
Local<Function>::Cast(args[1])->Call(isolate->GetCurrentContext()->Global(), 1, argv);
});