main: always do full session reset

This commit is contained in:
Astro 2020-03-20 23:20:38 +01:00
parent 194871c85a
commit 63cc1d2fe1
2 changed files with 1 additions and 7 deletions

View File

@ -152,9 +152,7 @@ fn main() -> ! {
server.for_each(|mut socket, session| {
if ! socket.is_open() {
let _ = socket.listen(TCP_PORT);
if session.is_dirty() {
session.reset();
}
} else if socket.can_send() && socket.can_recv() && socket.send_capacity() - socket.send_queue() > 128 {
match socket.recv(|buf| session.feed(buf)) {
Ok(SessionOutput::Nothing) => {}

View File

@ -79,10 +79,6 @@ impl Session {
self.report_pending = [false; CHANNELS];
}
pub fn is_dirty(&self) -> bool {
self.reader.pos > 0
}
pub fn reporting(&self) -> bool {
self.reporting
}