Commit d81dfbcc authored by John Resig's avatar John Resig

The code for handling Ajax timeouts was broken (the abort was being called too...

The code for handling Ajax timeouts was broken (the abort was being called too early). Fixing this allows the test suite to work again.
parent ab551c2b
...@@ -393,11 +393,12 @@ jQuery.extend({ ...@@ -393,11 +393,12 @@ jQuery.extend({
setTimeout(function(){ setTimeout(function(){
// Check to see if the request is still happening // Check to see if the request is still happening
if ( xhr ) { if ( xhr ) {
// Cancel the request
xhr.abort();
if( !requestDone ) if( !requestDone )
onreadystatechange( "timeout" ); onreadystatechange( "timeout" );
// Cancel the request
if ( xhr )
xhr.abort();
} }
}, s.timeout); }, s.timeout);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment