Small network fix.

This commit is contained in:
Revertron
2024-07-10 22:46:44 +02:00
parent de46148e01
commit e7eb383a35
+1 -1
View File
@@ -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]) { match stream.read(&mut buf[bytes_read..data_size]) {
Ok(bytes) => { Ok(bytes) => {
bytes_read += bytes; bytes_read += bytes;
if bytes_read == data_size { if bytes_read == data_size || bytes == 0 {
break; break;
} }
} }