Skip to content

Commit 091cd02

Browse files
Fix secondsToExpiry cache compilation errors
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
1 parent 6851763 commit 091cd02

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

‎src/AppWrapper.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -993,11 +993,11 @@ void uWS_App(const FunctionCallbackInfo<Value> &args) {
993993

994994

995995
} else {
996-
uWS_App_get<APP>(&uWS::TemplatedApp<false>::get, args);
996+
uWS_App_get<APP>(static_cast<uWS::App && (uWS::App::*)(std::string, uWS::MoveOnlyFunction<void(uWS::HttpResponse<false> *, uWS::HttpRequest *)> &&)>(&uWS::App::get), args);
997997
}
998998

999999
} else if constexpr (std::is_same<APP, uWS::SSLApp>::value) {
1000-
uWS_App_get<APP>(&uWS::TemplatedApp<true>::get, args);
1000+
uWS_App_get<APP>(static_cast<uWS::SSLApp && (uWS::SSLApp::*)(std::string, uWS::MoveOnlyFunction<void(uWS::HttpResponse<true> *, uWS::HttpRequest *)> &&)>(&uWS::SSLApp::get), args);
10011001
}
10021002

10031003
}, args.Data()));

‎src/HttpResponseWrapper.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ struct HttpResponseWrapper {
4444
if constexpr (PROTOCOL == 2) {
4545
return (uWS::Http3Response *) res;
4646
} else if constexpr (PROTOCOL == 3) {
47-
//return (uWS::CachingHttpResponse *) res; // is correct
48-
return (uWS::HttpResponse<PROTOCOL != 0> *) res; // not correct
47+
return (uWS::HttpCacheResponse *) res;
4948
} else {
5049
return (uWS::HttpResponse<PROTOCOL != 0> *) res;
5150
}

0 commit comments

Comments
 (0)