Skip to content

A Stream object in a pending state won't be dropped after the client disconnect #1313

@masnagam

Description

@masnagam

I'm not sure if it was intended, but a Stream object in a pending state won't be dropped after the client disconnects.

I found this issue in actix-web 2.0.0 and created a small test program like below:
https://github.com/masnagam/rust-case-studies/blob/master/actix-web-streaming-and-tcp-disconnect/src/main.rs

When executing the following command:

timeout 3 curl -v http://localhost:3000/pending

we never see PendingStream: Dropped in the log messages from the test program.

If a stream returns a Poll::Ready, it will be dropped shortly. We can see that by executing:

timeout 3 curl -v http://localhost:3000/alternate

Is there any workaround to stop polling the pending stream shortly when the client disconnects?

Metadata

Metadata

Assignees

Labels

A-httpproject: actix-httpC-bugCategory: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions