diff --git a/src/AppWrapper.h b/src/AppWrapper.h index c7a0320e9..2c642cae6 100644 --- a/src/AppWrapper.h +++ b/src/AppWrapper.h @@ -758,7 +758,12 @@ void uWS_App_adoptSocket(const FunctionCallbackInfo &args) { int32_t fd = args[0]->Int32Value(isolate->GetCurrentContext()).ToChecked(); - app->adoptSocket(fd); + NativeString ip(isolate, args[1]); + if (ip.isInvalid(args)) { + return; + } + + app->adoptSocket(fd, ip.getString()); args.GetReturnValue().Set(args.This()); }