diff options
author | Maxim Devaev <[email protected]> | 2022-02-24 12:41:01 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-02-24 12:41:01 +0300 |
commit | ade918eb72a6cfce1b4444f0a8a9a4b6fe86862c (patch) | |
tree | f5ee8fbb54db62062df28c9f7047553c6a56d3e6 /web | |
parent | a8af9b62909747bedbeb900c45da8c2fdc8767c3 (diff) |
increased ocr timeout
Diffstat (limited to 'web')
-rw-r--r-- | web/share/js/kvm/ocr.js | 2 | ||||
-rw-r--r-- | 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; }; |