Skip to content

Commit 220f1ce

Browse files
committed
Add warning for 0rtt without wait_for_ticket
1 parent 3e834fd commit 220f1ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

irpc-iroh/examples/0rtt.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ async fn main() -> Result<()> {
4949
no_0rtt,
5050
wait_for_ticket,
5151
} => {
52+
if !no_0rtt && !wait_for_ticket {
53+
eprintln!("0-RTT is enabled but wait_for_ticket is not set. After 2 requests with 0rtt the 0rtt resumption tickets will be consumed and a connection will be done without 0rtt.");
54+
}
5255
let n = n
5356
.iter()
5457
.filter_map(|x| u64::try_from(*x).ok())

0 commit comments

Comments
 (0)