Side navigation
#6640 closed bug (invalid)
Opened June 06, 2010 10:24PM UTC
Closed October 12, 2010 05:15AM UTC
complete() called twice in error condition
Reported by: | noel_bush | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.4.3 |
Component: | ajax | Version: | 1.4.2 |
Keywords: | xhr complete | Cc: | |
Blocked by: | Blocking: |
Description
In $.ajax(), line 5251 starts a try/catch that calls send() on the xhr. As part of the send operation, the onreadystatechange() function is called (line 5163), and in some circumstances, complete() is called (line 5214). One of these circumstances is when the server is not available. An XMLHttpRequestException with code 101 / name NETWORK_ERR is thrown, and caught by the catch clause (line 5253), which then calls complete() again.
The documentation doesn't mention that complete() might be called twice.
(All line numbers are from the (non-compressed) v1.4.2.)
Attachments (0)
Change History (1)
Changed October 12, 2010 05:15AM UTC by comment:1
keywords: | → xhr complete |
---|---|
need: | Review → Test Case |
priority: | → undecided |
resolution: | → invalid |
status: | new → closed |
Although I've taken a look into lines 5251, 5214 and 5253, would you be able to supply us with a complete test case showing where complete() is being called twice? That would allow us to investigate further without guessing the change in behaviour that would solve the issue.
Please re-submit your ticket once this is available and we'll look at it again.
Thanks!