aboutsummaryrefslogtreecommitdiff
path: root/src/conn.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/conn.rs')
-rw-r--r--src/conn.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conn.rs b/src/conn.rs
index 9b60d2a..df3b7cf 100644
--- a/src/conn.rs
+++ b/src/conn.rs
@@ -107,7 +107,8 @@ impl RecvLoop for ServerConn {
let kind = u32::from_be_bytes(kind_bytes);
if let Some(handler) = self.netapp.msg_handlers.load().get(&kind) {
- let resp = handler(self.peer_pk.clone(), bytes.slice(5..)).await;
+ let net_handler = &handler.net_handler;
+ let resp = net_handler(self.peer_pk.clone(), bytes.slice(5..)).await;
self.resp_send
.send((id, prio, resp))
.log_err("ServerConn recv_handler send resp");
@@ -240,7 +241,7 @@ impl ClientConn {
Ok(())
}
- pub async fn request<T>(
+ pub(crate) async fn request<T>(
self: Arc<Self>,
rq: T,
prio: RequestPriority,