mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
increased ocr timeout
This commit is contained in:
parent
a8af9b6290
commit
ade918eb72
@ -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__();
|
||||||
|
|||||||
@ -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;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user