Shorten timeout for AJAX

This commit is contained in:
Omar Roth
2019-06-16 12:34:00 -05:00
parent 458e9d6cc7
commit 17edfd6573
8 changed files with 19 additions and 25 deletions

View File

@@ -65,7 +65,7 @@ function remove_subscription(target) {
'&c=' + target.getAttribute('data-ucid');
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');

View File

@@ -57,7 +57,7 @@ function revoke_token(target) {
'&session=' + target.getAttribute('data-session');
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');