aiortc / aioquic

QUIC and HTTP/3 implementation in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What's the expected behavior if the server restarts and receives living client's frame?

lotabout opened this issue · comments

Consider the client and server had established a connection and the client had already sent some data using a new stream.

Now the server restarts, and client's frame arrives. What would happen?

I know little about the details of QUIC. In TCP, server would send a RST packet to client since the states of the server lost and client get the chance to know something is wrong.

Currently aioquic seems to silently drops the client's packet after restart. Is this behavior expected in QUIC?

Failed to get the protocol since _protocols were lost during restart:

protocol = self._protocols.get(header.destination_cid, None)

And quit the handler doing nothing:

if protocol is not None:
protocol.datagram_received(data, addr)

Seems that it is optional to send a reset if connection id could not be matched in the server.

Endpoints can send a Stateless Reset (Section 10.3) for any packets that cannot be attributed to an existing connection. A Stateless Reset allows a peer to more quickly identify when a connection becomes unusable.
-- https://datatracker.ietf.org/doc/html/rfc9000#section-5.2-4