You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
watch: prevent done callback from being called twice on connection loss
Avoids multiple invocations of the done callback when a watch connection
is closed unexpectedly (e.g., a premature socket close). The fix sets
doneCalled = true before calling controller.abort(), to ensure that any
AbortError triggered by aborting does not result in another call to the
done callback.
A regression test is included to simulate an abrupt connection termination.
It uses a real HTTP server that flushes headers and then destroys the
connection immediately. This reliably triggers the combination of AbortError
and Premature close needed to reproduce the issue.
Refs: #2387
0 commit comments