diff --git a/protocols/ping/src/protocol.rs b/protocols/ping/src/protocol.rs index 9bd5682f..fab16b36 100644 --- a/protocols/ping/src/protocol.rs +++ b/protocols/ping/src/protocol.rs @@ -83,7 +83,7 @@ where type Future = BoxFuture<'static, Result>; fn upgrade_outbound(self, mut socket: TSocket, _: Self::Info) -> Self::Future { - let payload: [u8; 32] = thread_rng().sample(distributions::Standard); + let payload: [u8; PING_SIZE] = thread_rng().sample(distributions::Standard); debug!("Preparing ping payload {:?}", payload); async move { socket.write_all(&payload).await?;