# HG changeset patch # User alfadur # Date 1559681956 -10800 # Node ID 1aa3b44c044176b669b3acb27ddc32a6e4e0f61f # Parent 4f31954a0b815559895a06db44044238f6407b4d fix parser getting stuck diff -r 4f31954a0b81 -r 1aa3b44c0441 rust/hedgewars-server/src/protocol.rs --- a/rust/hedgewars-server/src/protocol.rs Tue Jun 04 23:44:01 2019 +0300 +++ b/rust/hedgewars-server/src/protocol.rs Tue Jun 04 23:59:16 2019 +0300 @@ -46,7 +46,7 @@ pub fn extract_messages(&mut self) -> Vec { let mut messages = vec![]; if !self.is_recovering { - loop { + while !self.buf.is_empty() { match parser::message(&self.buf[..]) { Ok((tail, message)) => { messages.push(message);