From dec024d88fd129d383bf39ffbe0329099c2a5579 Mon Sep 17 00:00:00 2001 From: Revertron Date: Wed, 10 Jul 2024 22:44:08 +0200 Subject: [PATCH] Small network fix. --- src/p2p/network.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p2p/network.rs b/src/p2p/network.rs index 82b5be8..7035fcd 100644 --- a/src/p2p/network.rs +++ b/src/p2p/network.rs @@ -791,7 +791,7 @@ fn read_message(stream: &mut TcpStream, buf: &mut [u8]) -> Result match stream.read(&mut buf[bytes_read..data_size]) { Ok(bytes) => { bytes_read += bytes; - if bytes_read == data_size { + if bytes_read == data_size || bytes_read == 0 { break; } }