Skip to content

πŸ› Bug Report β€” TCP socket closes with its closed promise in pending stateΒ #5653

@rikka0w0

Description

@rikka0w0

I have a question regarding the TCP connect() API. In my case, I set the allowHalfOpen to true. When the TCP server starts the close handshake, I can see that tcpSocket.readable is closed and unlocked. Then I write one last data chunk to my own ReadableStream (which was pipeTo(tcpSocket.writable)) and close it with controller.close(). I notice that the TCP connection terminates as expected on the TCP server side, but tcpSocket.closed stays pending.

Is this behavior intentional? Or should I always explicitly call tcpSocket.close(), even if both streams are closed?

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