Skip to content
Permalink
Browse files

The code for handling Ajax timeouts was broken (the abort was being c…

…alled too early). Fixing this allows the test suite to work again.
  • Loading branch information
jeresig committed Nov 18, 2008
1 parent ab551c2 commit d81dfbcccf07aa63c6bf5beb10a2d37207d9e340
Showing with 4 additions and 3 deletions.
  1. +4 −3 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);
}

0 comments on commit d81dfbc

Please sign in to comment.
You can’t perform that action at this time.