increased ocr timeout

This commit is contained in:
Maxim Devaev 2022-02-24 12:41:01 +03:00
parent a8af9b6290
commit ade918eb72
2 changed files with 3 additions and 3 deletions

View File

@ -186,7 +186,7 @@ export function Ocr(__getGeometry) {
tools.el.setEnabled($("stream-ocr-lang-selector"), true); tools.el.setEnabled($("stream-ocr-lang-selector"), true);
$("stream-ocr-led").className = "led-gray"; $("stream-ocr-led").className = "led-gray";
} }
}); }, null, null, 30000);
}; };
__init__(); __init__();

View File

@ -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(); let http = new XMLHttpRequest();
http.open(method, url, true); http.open(method, url, true);
if (content_type) { if (content_type) {
http.setRequestHeader("Content-Type", content_type); http.setRequestHeader("Content-Type", content_type);
} }
http.onreadystatechange = callback; http.onreadystatechange = callback;
http.timeout = 15000; http.timeout = timeout;
http.send(body); http.send(body);
return http; return http;
}; };