When I use curl (build with quiche) for http3 request, sometimes it stucks at n-th run, but it's random (60 - 300 range).
for i in $(seq 1 1000)
curl --http3 https://http3-server/1k.png
I expected the following
It should continuously run curl commands without failure.
When I look at server log, I have found the following:
curl doesn't seems to properly close QUIC connection, by calling quiche_conn_close()
this cause the server to close the connection by idle timeout
before idle timeout expires, if next curl command try to reuse the same udp port which is not closed in the server, the server think it's a part of existing connection and drop the packet because it expects a short QUIC packet but long (Initial) packet is received. That's why it looks random (=up to the client OS picking up the source udp port)
I think that if Initial packet has a different CID, then it should be treated as new connection. If server only considers client address and port to associate QUIC connection, it is impossible for client to share a single port between multiple connections.
That said, I think it would be polite to explicitly close the connection if curl knows it does not use the connection anymore.