e7ae98e1 by Alex Rubin

Fix timeouts

1 parent 0337945d
......@@ -42,13 +42,6 @@
request.withCredentials = true;
}
if (options.timeout) {
if (request.timeout === 0) {
request.timeout = options.timeout;
request.ontimeout = function() {
request.timedout = true;
};
} else {
// polyfill XHR2 by aborting after the timeout
abortTimeout = window.setTimeout(function() {
if (request.readyState !== 4) {
request.timedout = true;
......@@ -56,7 +49,6 @@
}
}, options.timeout);
}
}
request.onreadystatechange = function() {
// wait until the request completes
......