Skip to content

Commit

Permalink
Fix access logs metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Eloi DEMOLIS <[email protected]>
  • Loading branch information
Wonshtrum committed Jun 3, 2024
1 parent 8c82e59 commit 1bf28a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion command/src/logging/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl fmt::Display for LogDuration {

let ms = duration.as_millis();
if ms < 10 {
let us = duration.as_millis();
let us = duration.as_micros();
if us >= 10 {
return write!(f, "{us}μs");
}
Expand Down
4 changes: 2 additions & 2 deletions lib/src/protocol/kawa_h1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,6 @@ impl<Front: SocketHandler, L: ListenerHandler + L7ListenerHandler> Http<Front, L
}

if response_stream.is_terminated() && response_stream.is_completed() {
metrics.reset();

if self.context.closing {
debug!(
"{} closing proxy, no keep alive",
Expand Down Expand Up @@ -574,11 +572,13 @@ impl<Front: SocketHandler, L: ListenerHandler + L7ListenerHandler> Http<Front, L
) {
(true, true, true) => {
debug!("{} keep alive front/back", self.context.log_context());
metrics.reset();
self.reset();
StateResult::Continue
}
(true, false, true) => {
debug!("{} keep alive front", self.context.log_context());
metrics.reset();
self.reset();
StateResult::CloseBackend
}
Expand Down

0 comments on commit 1bf28a2

Please sign in to comment.