From 02ccb38840911a072be84f6d075c88d9c8054969 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Tue, 11 Oct 2011 12:41:43 +0000 Subject: Do not abort request never used before as it can throw error e.g. on Firefox --- itjs/http.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'itjs') 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); }, -- cgit v1.2.3