fix merge

This commit is contained in:
fakeshadow 2020-12-13 09:04:39 +08:00
parent 2600f22135
commit 8a03a33aa6
1 changed files with 8 additions and 8 deletions

View File

@ -61,20 +61,20 @@ where
}
fn call(&mut self, (guard, req): (Option<CounterGuard>, MioStream)) -> Self::Future {
match FromStream::from_mio(stream) {
ready(match FromStream::from_mio(req) {
Ok(stream) => {
let f = self.service.call(stream);
actix_rt::spawn(async move {
let _ = f.await;
drop(guard);
let _ = f.await;
drop(guard);
});
ready(Ok(()))
Ok(())
}
Err(e) => {
error!("Can not convert to an async tcp stream: {}", e);
ready(Err(()))
Err(e) => {
error!("Can not convert to an async tcp stream: {}", e);
Err(())
}
};
})
}
}