From d81dfbcccf07aa63c6bf5beb10a2d37207d9e340 Mon Sep 17 00:00:00 2001 From: John Resig Date: Tue, 18 Nov 2008 04:53:34 +0000 Subject: [PATCH] The code for handling Ajax timeouts was broken (the abort was being called too early). Fixing this allows the test suite to work again. --- src/ajax.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); } -- 1.7.10.4