Skip to content

Commit

Permalink
trace: adds back call to classify_eos on trailers
Browse files Browse the repository at this point in the history
- was dropped in the http-body 1.0 upgrade
  • Loading branch information
markdingram committed Apr 2, 2024
1 parent 15d32dc commit f5edf6f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tower-http/src/trace/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ where

let frame = match frame.into_trailers() {
Ok(trailers) => {
if let Some((classify_eos, mut on_failure)) =
this.classify_eos.take().zip(this.on_failure.take())
{
if let Err(failure_class) = classify_eos.classify_eos(Some(&trailers)) {
on_failure.on_failure(failure_class, latency, this.span);
}
}
if let Some((on_eos, stream_start)) = this.on_eos.take() {
on_eos.on_eos(Some(&trailers), stream_start.elapsed(), this.span);
}
Expand Down

0 comments on commit f5edf6f

Please sign in to comment.