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?