diff options
Diffstat (limited to 'src/server.rs')
-rw-r--r-- | src/server.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/server.rs b/src/server.rs index 73ae267..c7d99b5 100644 --- a/src/server.rs +++ b/src/server.rs @@ -150,8 +150,12 @@ impl RecvLoop for ServerConn { trace!("ServerConn recv_handler {} ({} bytes)", id, bytes.len()); let bytes: Bytes = bytes.into(); + let prio = if !bytes.is_empty() { + bytes[0] + } else { + 0u8 + }; let resp = self.recv_handler_aux(&bytes[..]).await; - let prio = bytes[0]; let mut resp_bytes = vec![]; match resp { @@ -164,8 +168,11 @@ impl RecvLoop for ServerConn { } } + trace!("ServerConn sending response to {}: ", id); + self.resp_send .send(Some((id, prio, resp_bytes))) .log_err("ServerConn recv_handler send resp"); } } + |