Skip to content

Infinite loop on Stream::poll_shutdown() #92

Closed
@hatoo

Description

@hatoo

fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
while self.session.wants_write() {
ready!(self.write_io(cx))?;
}

self.write_io(cx) in the snippet may returns Ok(0) and causing an infinite loop.

I've faced this issue in my project.
I've failed to minimize codes that trigger this issue but please let me know if you want to see codes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions