@@ -307,7 +307,8 @@ pub fn route_data(
307
307
. map ( |i| i. load ( ) )
308
308
. and_then ( |i| i. is_empty ( ) . not ( ) . then_some ( i) )
309
309
{
310
- let cache = prefix. get_ingress_cache ( face) ;
310
+ let cache_guard = prefix. get_ingress_cache ( face, & interceptor) ;
311
+ let cache = cache_guard. as_ref ( ) . and_then ( |c| c. get_ref ( ) . as_ref ( ) ) ;
311
312
let ctx = & mut RoutingContext :: new ( NetworkMessageMut {
312
313
body : NetworkBodyMut :: Push ( msg) ,
313
314
reliability,
@@ -369,7 +370,9 @@ pub fn route_data(
369
370
. map ( |i| i. load ( ) )
370
371
. and_then ( |i| i. is_empty ( ) . not ( ) . then_some ( i) )
371
372
{
372
- let cache = prefix. get_egress_cache ( face) ;
373
+ let cache_guard = prefix. get_ingress_cache ( face, & interceptor) ;
374
+ let cache = cache_guard. as_ref ( ) . and_then ( |c| c. get_ref ( ) . as_ref ( ) ) ;
375
+
373
376
let ctx = & mut RoutingContext :: new ( NetworkMessageMut {
374
377
body : NetworkBodyMut :: Push ( msg) ,
375
378
reliability,
@@ -420,13 +423,15 @@ pub fn route_data(
420
423
. map ( |i| i. load ( ) )
421
424
. and_then ( |i| i. is_empty ( ) . not ( ) . then_some ( i) )
422
425
{
423
- let cache = prefix. get_egress_cache ( face) ;
426
+ let cache_guard = prefix. get_ingress_cache ( face, & interceptor) ;
427
+ let cache = cache_guard. as_ref ( ) . and_then ( |c| c. get_ref ( ) . as_ref ( ) ) ;
428
+
424
429
let ctx = & mut RoutingContext :: new ( NetworkMessageMut {
425
430
body : NetworkBodyMut :: Push ( msg) ,
426
431
reliability,
427
432
} ) ;
428
433
429
- if !interceptor. intercept ( ctx, cache) {
434
+ if !interceptor. intercept ( ctx, cache. as_deref ( ) ) {
430
435
continue ;
431
436
}
432
437
} ;
0 commit comments