diff options
author | Christian Schneider | 2011-10-11 12:41:43 +0000 |
---|---|---|
committer | Christian Schneider | 2011-10-11 12:41:43 +0000 |
commit | 02ccb38840911a072be84f6d075c88d9c8054969 (patch) | |
tree | 10c545e1556f78d30e9b05f0a97fc5b1236b1e83 | |
parent | 7505e77cdfd6d546f1443240059fad43dafd2015 (diff) | |
download | itools-02ccb38840911a072be84f6d075c88d9c8054969.tar.gz itools-02ccb38840911a072be84f6d075c88d9c8054969.tar.bz2 itools-02ccb38840911a072be84f6d075c88d9c8054969.zip |
Do not abort request never used before as it can throw error e.g. on Firefox
-rwxr-xr-x | itjs/http.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/itjs/http.js b/itjs/http.js index faafe56..5773cda 100755 --- a/itjs/http.js +++ b/itjs/http.js @@ -184,8 +184,11 @@ dataReady: function(data, callid) stop: function() { - try { this.req.aborted = true; this.req.abort(); } // Set aborted flag as IE9 throws error c00c023f when accessing aborted request - catch (e) { } + try { + this.req.aborted = true; // Set aborted flag as IE9 throws error c00c023f when accessing aborted request + if (this.req.readyState >= 2) // Do not abort request never used before as it can throw error e.g. on Firefox + this.req.abort(); + } catch (e) { } this.unlink(this.callid); }, |