When a QUIC connection receives a CONNECTION_CLOSE frame, it is supposed to 
enter the draining state, where all incoming (reordered / replayed) packets are 
silently discarded. However, the current implementation removes the connection 
from the endpoint, and reordered/replayed packets trigger sending of a 
stateless reset instead. This patch fixes that issue.

I modified the `StatelessResetReceiptTest` to verify that the connection is 
still registered with the endpoint after it enters the draining state. The new 
test fails (most of the time) without the fix, passes with the fix.

Existing httpclient tests continue to pass.

-------------

Commit messages:
 - Fix handling of draining connections
 - Add test

Changes: https://git.openjdk.org/jdk/pull/28874/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28874&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8373877
  Stats: 26 lines in 4 files changed: 18 ins; 4 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/28874.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28874/head:pull/28874

PR: https://git.openjdk.org/jdk/pull/28874

Reply via email to