aboutsummaryrefslogtreecommitdiff
path: root/src/server.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-10-13 12:33:14 +0200
committerAlex Auvolat <alex@adnab.me>2021-10-13 12:33:14 +0200
commit8dede69dee20b812ad1dcab5b374c60232409f4f (patch)
tree0b9ae54f27b4fb7bd6cfd09e1d78a70facf01a33 /src/server.rs
parentd9bd1182f7b980df8e631ae8eeca444f5d997909 (diff)
downloadnetapp-8dede69dee20b812ad1dcab5b374c60232409f4f.tar.gz
netapp-8dede69dee20b812ad1dcab5b374c60232409f4f.zip
Fix netapp protocol & adapt basalt to new api
Diffstat (limited to 'src/server.rs')
-rw-r--r--src/server.rs9
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");
}
}
+