Skip to content

<TcpStream as Write>::poll_close does nothing #599

Closed
@twittner

Description

@twittner
Contributor

It seems that <TcpStream as Write>::poll_close calls <&TcpStream as Write>::poll_close which is a no-op. Would it not be more appropriate to shutdown the write direction of the socket, i.e. call TcpStream::shutdown with std::net::Shutdown::Write? Otherwise two processes that wait on each others EOF will wait forever.

Activity

yoshuawuyts

yoshuawuyts commented on Dec 12, 2019

@yoshuawuyts
Contributor

@twittner what you're suggesting seems reasonable; if you have the time, a patch for this would be greatly appreciated!

added a commit that references this issue on Dec 12, 2019
c90732a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @twittner@yoshuawuyts

      Issue actions

        `<TcpStream as Write>::poll_close` does nothing · Issue #599 · async-rs/async-std