Skip to content

Commit ec06664

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

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

tower-http/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ 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. ([#580])
13+
14+
[#580]: https://github.com/tower-rs/tower-http/pull/580
15+
816
# 0.6.6
917

1018
## 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)