From: John Resig Date: Tue, 18 Nov 2008 04:53:34 +0000 (+0000) Subject: The code for handling Ajax timeouts was broken (the abort was being called too early... X-Git-Url: http://git.asbjorn.biz/?a=commitdiff_plain;h=d81dfbcccf07aa63c6bf5beb10a2d37207d9e340;p=jquery.git The code for handling Ajax timeouts was broken (the abort was being called too early). Fixing this allows the test suite to work again. --- diff --git a/src/ajax.js b/src/ajax.js index 55fc25d..d02d331 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -393,11 +393,12 @@ jQuery.extend({ setTimeout(function(){ // Check to see if the request is still happening if ( xhr ) { - // Cancel the request - xhr.abort(); - if( !requestDone ) onreadystatechange( "timeout" ); + + // Cancel the request + if ( xhr ) + xhr.abort(); } }, s.timeout); }