Ok::<_,AE>(resp)
}).await? }.await;
- let r = c.reporter.lock().report(Some(req_num), r);
+ let r = c.reporter.lock().filter(Some(req_num), r);
if r.is_none() {
tokio::time::sleep(c.ic.http_retry).await;
},
_ = async { },
- if reporter.lock().report(None, {
+ if reporter.lock().filter(None, {
if rx_queue.remaining() < ic.max_batch_down.sat() * 3 /* xxx */ {
// xxx make this separate option ? docs say server only
Ok(())
reqs.swap_remove(goti);
if let Some(got) = got {
+ reporter.lock().success();
//eprintln!("got={:?}", DumpHex(&got));
checkn(SlipNoConv,ic.mtu, &got, &mut rx_queue, |header| {
let addr = ip_packet_addr::<true>(header)?;
ic
} }
- pub fn report<T>(&mut self, req_num: Option<ReqNum>, r: Result<T,AE>)
+ pub fn success(&mut self) {
+ info!("{}: success", self.ic); // xxx
+ }
+ pub fn filter<T>(&mut self, req_num: Option<ReqNum>, r: Result<T,AE>)
-> Option<T> {
match r {
Ok(t) => {