mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
fix: connection close should stay outside the poll loop (#2308)
This commit is contained in:
parent
e79123fd5c
commit
0b73e87f8c
2 changed files with 4 additions and 2 deletions
|
@ -291,11 +291,11 @@ fn poll<H>(
|
||||||
.map(|a| a.to_string())
|
.map(|a| a.to_string())
|
||||||
.unwrap_or("?".to_owned())
|
.unwrap_or("?".to_owned())
|
||||||
);
|
);
|
||||||
let _ = conn.shutdown(Shutdown::Both);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
thread::sleep(sleep_time);
|
thread::sleep(sleep_time);
|
||||||
}
|
}
|
||||||
|
let _ = conn.shutdown(Shutdown::Both);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -526,7 +526,9 @@ impl TrackingAdapter {
|
||||||
if known.len() > MAX_TRACK_SIZE {
|
if known.len() > MAX_TRACK_SIZE {
|
||||||
known.truncate(MAX_TRACK_SIZE);
|
known.truncate(MAX_TRACK_SIZE);
|
||||||
}
|
}
|
||||||
known.insert(0, hash);
|
if !known.contains(&hash) {
|
||||||
|
known.insert(0, hash);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue