main: always do full session reset
This commit is contained in:
parent
194871c85a
commit
63cc1d2fe1
@ -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();
|
||||
}
|
||||
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) => {}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user