From 32591465f314abe4e34033b6e0f7c369c5a52f78 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Wed, 18 Aug 2021 19:29:08 +1000 Subject: [PATCH] [windows-x] Fix runtime timeout --- v2/internal/frontend/runtime/desktop/calls.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/v2/internal/frontend/runtime/desktop/calls.js b/v2/internal/frontend/runtime/desktop/calls.js index b7a79743..68e5ed12 100644 --- a/v2/internal/frontend/runtime/desktop/calls.js +++ b/v2/internal/frontend/runtime/desktop/calls.js @@ -9,7 +9,7 @@ The lightweight framework for web-like apps */ /* jshint esversion: 6 */ -import { SendMessage } from './ipc'; +import {SendMessage} from './ipc'; var callbacks = {}; @@ -72,9 +72,10 @@ export function Call(name, args, timeout) { callbackID = name + '-' + randomFunc(); } while (callbacks[callbackID]); + var timeoutHandle; // Set timeout if (timeout > 0) { - var timeoutHandle = setTimeout(function () { + timeoutHandle = setTimeout(function () { reject(Error('Call to ' + name + ' timed out. Request ID: ' + callbackID)); }, timeout); }