cloudflare / cloudflare/quiche
Session resumption doesn't work
- Dominant language
- Rust
- Stars
- 11.8k
- Forks
- 1.1k
- Avg merge
- 21h 9m
- Merged PRs (30d)
- 6
Description
Hi there
I'm trying to use session resumption with 0-RTT using Connection::session() and Connection::set_session() directly after recreating a connection. The client which should save the session with .session() is somehow not able to pull any session-info.
Establishing a connection between server and client with full handshake works according to the logs, the server also sends a stateless retry and the client uses the retry-packet to extract the SCID correctly. But session resumption doesn't work
```
if conn.is_established() {
info!("connection established, {:?}", conn.stats());
// Save session data after the connection is established
if let Some(session_data) = conn.session() {
let data_vec = session_data.to_vec();
info!("Session data received after connection establishment: {:?}", data_vec);
return Ok((conn, Some(data_vec)));
} else {
error!("No session data received after connection establishment.");
return Ok((conn, None));
}
}
```
Here is a part of the logs:
2024-06-18T14:54:20.075143700Z [INFO] - connection established, recv=3 sent=2 lost=0 retrans=0 sent_bytes=618 recv_bytes=1503 lost_bytes=0
2024-06-18T14:54:20.075350000Z [ERROR] - No session data received after connection establishment.
Contributor guide
Research direction
Start by tracing Connection::session() and Connection::set_session() and reproduce the full-handshake flow described in the issue, including the stateless retry. Check why session() returns no data after establishment and verify the result against the supplied logs. Done means the client can obtain session data and use it for session resumption with 0-RTT.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100