@@ -956,7 +956,7 @@ impl Connection {
956
956
/// Will execute protocol logic upon receipt of a connection event, in turn preparing signals
957
957
/// (including application `Event`s, `EndpointEvent`s and outgoing datagrams) that should be
958
958
/// extracted through the relevant methods.
959
- pub fn handle_event ( & mut self , event : ConnectionEvent ) {
959
+ pub fn handle_event ( & mut self , event : ConnectionEvent , now : Instant ) {
960
960
use self :: ConnectionEventInner :: * ;
961
961
match event. 0 {
962
962
Datagram {
@@ -1001,7 +1001,7 @@ impl Connection {
1001
1001
self . set_loss_detection_timer ( now) ;
1002
1002
}
1003
1003
}
1004
- NewIdentifiers ( ids, now ) => {
1004
+ NewIdentifiers ( ids) => {
1005
1005
self . local_cid_state . new_cids ( & ids, now) ;
1006
1006
ids. into_iter ( ) . rev ( ) . for_each ( |frame| {
1007
1007
self . spaces [ SpaceId :: Data ] . pending . new_cids . push ( frame) ;
@@ -1071,7 +1071,7 @@ impl Connection {
1071
1071
self . local_cid_state. retire_prior_to( )
1072
1072
) ;
1073
1073
self . endpoint_events
1074
- . push_back ( EndpointEventInner :: NeedIdentifiers ( now , num_new_cid) ) ;
1074
+ . push_back ( EndpointEventInner :: NeedIdentifiers ( num_new_cid) ) ;
1075
1075
}
1076
1076
}
1077
1077
Timer :: MaxAckDelay => {
@@ -2354,7 +2354,7 @@ impl Connection {
2354
2354
. push_back ( EndpointEventInner :: ResetToken ( self . path . remote , token) ) ;
2355
2355
}
2356
2356
self . handle_peer_params ( params) ?;
2357
- self . issue_first_cids ( now ) ;
2357
+ self . issue_first_cids ( ) ;
2358
2358
} else {
2359
2359
// Server-only
2360
2360
self . spaces [ SpaceId :: Data ] . pending . handshake_done = true ;
@@ -2401,7 +2401,7 @@ impl Connection {
2401
2401
reason : "transport parameters missing" . into ( ) ,
2402
2402
} ) ?;
2403
2403
self . handle_peer_params ( params) ?;
2404
- self . issue_first_cids ( now ) ;
2404
+ self . issue_first_cids ( ) ;
2405
2405
self . init_0rtt ( ) ;
2406
2406
}
2407
2407
Ok ( ( ) )
@@ -2662,7 +2662,6 @@ impl Connection {
2662
2662
. on_cid_retirement ( sequence, self . peer_params . issue_cids_limit ( ) ) ?;
2663
2663
self . endpoint_events
2664
2664
. push_back ( EndpointEventInner :: RetireConnectionId (
2665
- now,
2666
2665
sequence,
2667
2666
allow_more_cids,
2668
2667
) ) ;
@@ -2889,15 +2888,15 @@ impl Connection {
2889
2888
}
2890
2889
2891
2890
/// Issue an initial set of connection IDs to the peer upon connection
2892
- fn issue_first_cids ( & mut self , now : Instant ) {
2891
+ fn issue_first_cids ( & mut self ) {
2893
2892
if self . local_cid_state . cid_len ( ) == 0 {
2894
2893
return ;
2895
2894
}
2896
2895
2897
2896
// Subtract 1 to account for the CID we supplied while handshaking
2898
2897
let n = self . peer_params . issue_cids_limit ( ) - 1 ;
2899
2898
self . endpoint_events
2900
- . push_back ( EndpointEventInner :: NeedIdentifiers ( now , n) ) ;
2899
+ . push_back ( EndpointEventInner :: NeedIdentifiers ( n) ) ;
2901
2900
}
2902
2901
2903
2902
fn populate_packet (
@@ -3372,10 +3371,10 @@ impl Connection {
3372
3371
/// Instruct the peer to replace previously issued CIDs by sending a NEW_CONNECTION_ID frame
3373
3372
/// with updated `retire_prior_to` field set to `v`
3374
3373
#[ cfg( test) ]
3375
- pub ( crate ) fn rotate_local_cid ( & mut self , v : u64 , now : Instant ) {
3374
+ pub ( crate ) fn rotate_local_cid ( & mut self , v : u64 ) {
3376
3375
let n = self . local_cid_state . assign_retire_seq ( v) ;
3377
3376
self . endpoint_events
3378
- . push_back ( EndpointEventInner :: NeedIdentifiers ( now , n) ) ;
3377
+ . push_back ( EndpointEventInner :: NeedIdentifiers ( n) ) ;
3379
3378
}
3380
3379
3381
3380
/// Check the current active remote CID sequence
0 commit comments