mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
[windows-x] Fix runtime timeout
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user