Small network fix.
This commit is contained in:
1 parent
de46148e01
commit
e7eb383a35
1 file changed
+1
-1
+1
-1
@@ -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 == 0 {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user