Update HttpResponseWrapper.h

This commit is contained in:
uNetworkingAB
2023-05-29 23:27:17 +02:00
committed by GitHub
parent cb64e34a51
commit 935839357b

View File

@@ -36,7 +36,7 @@ struct HttpResponseWrapper {
Isolate *isolate = args.GetIsolate();
auto *res = (uWS::HttpResponse<PROTOCOL != 0> *) args.Holder()->GetAlignedPointerFromInternalField(0);
if (!res) {
args.GetReturnValue().Set(isolate->ThrowException(v8::Exception::Error(String::NewFromUtf8(isolate, "Invalid access of discarded (invalid, deleted) uWS.HttpResponse/SSLHttpResponse.", NewStringType::kNormal).ToLocalChecked())));
args.GetReturnValue().Set(isolate->ThrowException(v8::Exception::Error(String::NewFromUtf8(isolate, "uWS.HttpResponse must not be accessed after uWS.HttpResponse.onAborted callback, or after a successful response. See documentation for uWS.HttpResponse and consult the user manual.", NewStringType::kNormal).ToLocalChecked())));
}
if constexpr (PROTOCOL == 2) {