[SC64][SW] Fix buffered receive bug in sc64deployer server

This commit is contained in:
Mateusz Faderewski 2024-03-04 00:54:51 +01:00
parent 7a83fb3eae
commit b4b3659458

View File

@ -172,7 +172,7 @@ fn server_stream_thread(
if exit_flag.load(Ordering::Relaxed) { if exit_flag.load(Ordering::Relaxed) {
return Ok(()); return Ok(());
} }
match stream.read(&mut header[header_position..header_length]) { match stream_reader.read(&mut header[header_position..header_length]) {
Ok(0) => return Ok(()), Ok(0) => return Ok(()),
Ok(bytes) => header_position += bytes, Ok(bytes) => header_position += bytes,
Err(error) => match error.kind() { Err(error) => match error.kind() {