File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
crates/core/src/operations Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,16 @@ pub(crate) async fn request_get(
8282 get_op : GetOp ,
8383 skip_list : HashSet < PeerId > ,
8484) -> Result < ( ) , OpError > {
85+ let mut skip_list = skip_list;
86+ // Always avoid bouncing straight back to ourselves.
87+ skip_list. insert (
88+ op_manager
89+ . ring
90+ . connection_manager
91+ . own_location ( )
92+ . peer
93+ . clone ( ) ,
94+ ) ;
8595 let ( mut candidates, id, key_val, _fetch_contract) = if let Some ( GetState :: PrepareRequest {
8696 key,
8797 id,
@@ -1271,6 +1281,7 @@ async fn try_forward_or_return(
12711281
12721282 let mut new_skip_list = skip_list. clone ( ) ;
12731283 new_skip_list. insert ( this_peer. peer . clone ( ) ) ;
1284+ new_skip_list. insert ( sender. peer . clone ( ) ) ;
12741285
12751286 let new_htl = htl. saturating_sub ( 1 ) ;
12761287
You can’t perform that action at this time.
0 commit comments