From ade918eb72a6cfce1b4444f0a8a9a4b6fe86862c Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Thu, 24 Feb 2022 12:41:01 +0300 Subject: increased ocr timeout --- web/share/js/kvm/ocr.js | 2 +- web/share/js/tools.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/share/js/kvm/ocr.js b/web/share/js/kvm/ocr.js index 7bf2ad5a..482e9da9 100644 --- a/web/share/js/kvm/ocr.js +++ b/web/share/js/kvm/ocr.js @@ -186,7 +186,7 @@ export function Ocr(__getGeometry) { tools.el.setEnabled($("stream-ocr-lang-selector"), true); $("stream-ocr-led").className = "led-gray"; } - }); + }, null, null, 30000); }; __init__(); diff --git a/web/share/js/tools.js b/web/share/js/tools.js index 006453bd..31e8b9b4 100644 --- a/web/share/js/tools.js +++ b/web/share/js/tools.js @@ -36,14 +36,14 @@ export var tools = new function() { /************************************************************************/ - self.makeRequest = function(method, url, callback, body=null, content_type=null) { + self.makeRequest = function(method, url, callback, body=null, content_type=null, timeout=15000) { let http = new XMLHttpRequest(); http.open(method, url, true); if (content_type) { http.setRequestHeader("Content-Type", content_type); } http.onreadystatechange = callback; - http.timeout = 15000; + http.timeout = timeout; http.send(body); return http; }; -- cgit v1.2.3