You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/HttpResponseWrapper.h
+18-1Lines changed: 18 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,8 +21,16 @@
21
21
#include<v8.h>
22
22
usingnamespacev8;
23
23
24
+
thread_localint insideCorkCallback = 0;
25
+
24
26
structHttpResponseWrapper {
25
27
28
+
staticvoidassumeCorked() {
29
+
if (!insideCorkCallback) {
30
+
std::cerr << "Critical warning: Calling uWS.HttpResponse [.writeStatus, .writeHeader, .end, .write, .tryEnd, .upgrade, .endWithoutBody, or similar] outside of uWS.HttpResponse.cork callback is highly discouraged due to major performance loss! Read the user manual and make the fix." << std::endl;
0 commit comments