Skip to content

Commit

Permalink
Merge pull request jeelabs#2 from dyarkovoy/master
Browse files Browse the repository at this point in the history
solution to issue jeelabs#267 (in jeelabs/esp-link)
  • Loading branch information
leodesigner committed Jun 24, 2018
2 parents 0011f7b + c541d5a commit 7f42d90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions html/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ function ajaxReq(method, url, ok_cb, err_cb, data) {
var xhr = j();
xhr.open(method, url, true);
var timeout = setTimeout(function() {
xhr.abort();
console.log("XHR abort:", method, url);
xhr.status = 599;
xhr.responseText = "request time-out";
}, 9000);
xhr.abort();
console.log("XHR abort:", method, url);
}, 30000);
xhr.onreadystatechange = function() {
if (xhr.readyState != 4) { return; }
clearTimeout(timeout);
Expand Down

0 comments on commit 7f42d90

Please sign in to comment.