diff options
author | John Resig <jeresig@gmail.com> | 2008-11-18 04:53:34 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2008-11-18 04:53:34 +0000 |
commit | d81dfbcccf07aa63c6bf5beb10a2d37207d9e340 (patch) | |
tree | 46a3164adbdd7347cb2818b479dc3b2931d43fc1 /src/ajax.js | |
parent | ab551c2b14ac6b0511cf3da10ca224ce461a0f10 (diff) | |
download | jquery-d81dfbcccf07aa63c6bf5beb10a2d37207d9e340.tar.gz jquery-d81dfbcccf07aa63c6bf5beb10a2d37207d9e340.zip |
The code for handling Ajax timeouts was broken (the abort was being called too early). Fixing this allows the test suite to work again.
Diffstat (limited to 'src/ajax.js')
-rw-r--r-- | src/ajax.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ajax.js b/src/ajax.js index 55fc25d14..d02d33135 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); } |