aboutsummaryrefslogtreecommitdiff
path: root/src/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.rs')
-rw-r--r--src/client.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client.rs b/src/client.rs
index 0dcbdf1..aef7bbb 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -35,7 +35,7 @@ pub(crate) struct ClientConn {
pub(crate) remote_addr: SocketAddr,
pub(crate) peer_id: NodeID,
- query_send: ArcSwapOption<mpsc::UnboundedSender<(RequestID, RequestPriority, ByteStream)>>,
+ query_send: ArcSwapOption<mpsc::UnboundedSender<SendStream>>,
next_query_number: AtomicU32,
inflight: Mutex<HashMap<RequestID, oneshot::Sender<ByteStream>>>,
@@ -165,7 +165,7 @@ impl ClientConn {
// Encode request
let req_enc = req.into_enc(prio, path.as_bytes().to_vec().into(), telemetry_id);
let req_msg_len = req_enc.msg.len();
- let req_stream = req_enc.encode();
+ let (req_stream, req_order) = req_enc.encode();
// Send request through
let (resp_send, resp_recv) = oneshot::channel();
@@ -175,7 +175,10 @@ impl ClientConn {
"Too many inflight requests! RequestID collision. Interrupting previous request."
);
let _ = old_ch.send(Box::pin(futures::stream::once(async move {
- Err(std::io::Error::new(std::io::ErrorKind::Other, "RequestID collision, too many inflight requests"))
+ Err(std::io::Error::new(
+ std::io::ErrorKind::Other,
+ "RequestID collision, too many inflight requests",
+ ))
})));
}