File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -938,8 +938,12 @@ void uWS_App(const FunctionCallbackInfo<Value> &args) {
938938 if constexpr (std::is_same<APP , uWS::App>::value) {
939939
940940 if (args.Length () == 3 ) {
941+
942+ /* Get secondsToExpiry */
943+ unsigned int secondsToExpiry = args[2 ]->Uint32Value (args.GetIsolate ()->GetCurrentContext ()).ToChecked ();
944+
941945 /* Use cached variant */
942- std::cout << " Registering cached get handler" << std::endl;
946+ std::cout << " Registering cached get handler with expiry = " << secondsToExpiry << std::endl;
943947
944948
945949 APP *app = (APP *) getInternalPointer (args.This ());// ->GetAlignedPointerFromInternalField(0);
@@ -983,7 +987,7 @@ void uWS_App(const FunctionCallbackInfo<Value> &args) {
983987
984988 /* µWS itself will terminate if not responded and not attached
985989 * onAborted handler, so we can assume it's done */
986- }, 13 );
990+ }, secondsToExpiry );
987991
988992 args.GetReturnValue ().Set (args.This ());
989993
You can’t perform that action at this time.
0 commit comments