@@ -35,6 +35,7 @@ use ring::rand::*;
3535use crate :: client:: QUIC_VERSION ;
3636use crate :: frame:: H3iFrame ;
3737use crate :: quiche;
38+ use crate :: quiche:: EventLoopIteration ;
3839
3940use crate :: actions:: h3:: Action ;
4041use crate :: actions:: h3:: StreamEventType ;
@@ -216,7 +217,9 @@ pub fn connect_with_early_data(
216217 let mut app_proto_selected = false ;
217218
218219 // Send ClientHello and initiate the handshake.
219- let ( write, send_info) = conn. send ( & mut out) . expect ( "initial send failed" ) ;
220+ let ( write, send_info) = conn
221+ . send ( & EventLoopIteration :: new ( ) , & mut out)
222+ . expect ( "initial send failed" ) ;
220223
221224 let mut client = SyncClient :: new ( close_trigger_frames) ;
222225 // Send early data if connection is_in_early_data (resumption with 0-RTT was
@@ -285,12 +288,14 @@ pub fn connect_with_early_data(
285288 log:: debug!( "actual sleep is {actual_sleep:?}" ) ;
286289 poll. poll ( & mut events, actual_sleep) . unwrap ( ) ;
287290
291+ let iteration = EventLoopIteration :: new ( ) ;
292+
288293 // If the event loop reported no events, run a belt and braces check on
289294 // the quiche connection's timeouts.
290295 if events. is_empty ( ) {
291296 log:: debug!( "timed out" ) ;
292297
293- conn. on_timeout ( ) ;
298+ conn. on_timeout ( & iteration ) ;
294299 }
295300
296301 // Read incoming UDP packets from the socket and feed them to quiche,
@@ -326,14 +331,15 @@ pub fn connect_with_early_data(
326331 } ;
327332
328333 // Process potentially coalesced packets.
329- let _read = match conn. recv ( & mut buf[ ..len] , recv_info) {
330- Ok ( v) => v,
334+ let _read =
335+ match conn. recv ( & iteration, & mut buf[ ..len] , recv_info) {
336+ Ok ( v) => v,
331337
332- Err ( e) => {
333- log:: debug!( "{local_addr}: recv failed: {e:?}" ) ;
334- continue ' read;
335- } ,
336- } ;
338+ Err ( e) => {
339+ log:: debug!( "{local_addr}: recv failed: {e:?}" ) ;
340+ continue ' read;
341+ } ,
342+ } ;
337343 }
338344 }
339345
@@ -433,6 +439,7 @@ pub fn connect_with_early_data(
433439 for peer_addr in conn. paths_iter ( local_addr) {
434440 loop {
435441 let ( write, send_info) = match conn. send_on_path (
442+ & iteration,
436443 & mut out,
437444 Some ( local_addr) ,
438445 Some ( peer_addr) ,
0 commit comments