mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +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);
|
||||
$("stream-ocr-led").className = "led-gray";
|
||||
}
|
||||
});
|
||||
}, null, null, 30000);
|
||||
};
|
||||
|
||||
__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();
|
||||
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;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user