We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 638267b commit 3ab6732Copy full SHA for 3ab6732
1 file changed
src/AppWrapper.h
@@ -758,7 +758,13 @@ void uWS_App_adoptSocket(const FunctionCallbackInfo<Value> &args) {
758
759
int32_t fd = args[0]->Int32Value(isolate->GetCurrentContext()).ToChecked();
760
761
- app->adoptSocket(fd);
+ NativeStringContext nativeStringContext;
762
+ NativeString ip(nativeStringContext, isolate, args[1]);
763
+ if (ip.isInvalid(args)) {
764
+ return;
765
+ }
766
+
767
+ app->adoptSocket(fd, ip.getString());
768
769
args.GetReturnValue().Set(args.This());
770
}
0 commit comments