Skip to content

TCP listener isn't closed in Tokio 0.2 on Windows #606

Open
@Xanewok

Description

@Xanewok

When migrating to Tokio 0.2 (in #603) we encountered an issue where the underlying OS socket wasn't closed on Windows (using mio v0.6) when shutting down Hyper server.

Because of this, the OS socket left open performs the TCP handshake but is incapable of doing any progress since the server has already quit. If a client attempts to connect, the connection itself will succeed but any further attempts to progress will block in mio.

For now, we explicitly close the OS socket when the Hyper server has quit but we would like to remove the workaround once we migrate to Tokio 1.0 (which has Windows backend overhauled in its mio v0.7 dependency).

Ref: #603 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions