This commit is contained in:
Dominik Werder
2023-02-16 13:16:55 +01:00
parent 7a10a740f6
commit cd13cc8374
3 changed files with 54 additions and 38 deletions
+3 -3
View File
@@ -818,11 +818,11 @@ impl CaConn {
} else {
self.ioc_ping_start = Some(Instant::now());
if let Some(proto) = &mut self.proto {
trace!("push echo to {}", self.remote_addr_dbg);
info!("push echo to {}", self.remote_addr_dbg);
let msg = CaMsg { ty: CaMsgTy::Echo };
proto.push_out(msg);
} else {
warn!("can not push echo, no proto");
warn!("can not push echo, no proto {}", self.remote_addr_dbg);
self.trigger_shutdown(ChannelStatusClosedReason::NoProtocol);
}
}
@@ -1443,7 +1443,7 @@ impl CaConn {
},
Err(e) => {
// TODO count only
error!("can not receive series lookup result {e}");
error!("can not receive series lookup result for {name} {e}");
Err(Error::with_msg_no_trace("can not receive lookup result"))
}
}
+4 -2
View File
@@ -109,6 +109,7 @@ impl CaConnSet {
let conn_fut = async move {
let stats = conn.stats();
let mut conn = conn;
let mut ret = Ok(());
while let Some(item) = conn.next().await {
match item {
Ok(item) => {
@@ -117,10 +118,11 @@ impl CaConnSet {
}
Err(e) => {
error!("CaConn gives error: {e:?}");
return Err(e);
ret = Err(e);
}
}
}
info!("CaConn stream ended {}", addr);
Self::conn_remove(&ca_conn_ress, addr).await?;
conn_item_tx
.send((
@@ -131,7 +133,7 @@ impl CaConnSet {
},
))
.await?;
Ok(())
ret
};
let jh = tokio::spawn(conn_fut);
let ca_conn_ress = CaConnRess {