mirror of
https://github.com/eycorsican/leaf.git
synced 2026-12-05 08:01:26 +00:00
outbound/failover: avoid stack buffer allocation
This commit is contained in:
1 parent
9f86ee25fa
commit
cc6586fac1
1 file changed
+1
-1
@@ -138,7 +138,7 @@ pub(self) async fn health_check(
|
||||
if send.send_to(&msg_buf, &addr).await.is_err() {
|
||||
return Measure(idx, u128::MAX - 2);
|
||||
}
|
||||
let mut buf = [0u8; 1500];
|
||||
let mut buf = vec![0u8; 1500];
|
||||
match recv.recv_from(&mut buf).await {
|
||||
Ok(_) => {
|
||||
let elapsed = tokio::time::Instant::now().duration_since(start);
|
||||
|
||||
Reference in new issue
Block a user