Skip to content

Commit 10fcc7c

Browse files
committed
Call on_eos for successful streams
1 parent 635692d commit 10fcc7c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

tower-http/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
# Unreleased
9+
10+
## Fixed
11+
12+
- `on_eos` is now called even for successful responses.
13+
814
# 0.6.6
915

1016
## Fixed

tower-http/src/trace/future.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ where
8080
let res = res.map(|body| ResponseBody {
8181
inner: body,
8282
classify_eos: None,
83-
on_eos: None,
83+
on_eos: on_eos.zip(Some(Instant::now())),
8484
on_body_chunk,
8585
on_failure: Some(on_failure),
8686
start,

0 commit comments

Comments
 (0)