Skip to content

Commit

Permalink
Small network fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Revertron committed Jul 10, 2024
1 parent de46148 commit dec024d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/p2p/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ fn read_message(stream: &mut TcpStream, buf: &mut [u8]) -> Result<usize, Error>
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;
}
}
Expand Down

0 comments on commit dec024d

Please sign in to comment.