You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The keep_alive_timeout config does cause the TLS stream to be terminated, but it won't close the underlying socket, which remains in the ESTABLISHED state.
This was discovered while troubleshooting an httpx issue. See: encode/httpx#2983
I can see that Hypercorn does call asyncio.StreamWriter.close() after the idle timeout. However, the transport is of type asyncio.sslproto._SSLProtocolTransport, which means there's no guarantee that the actual socket is closed. Looking at netstat, the TCP socket remains ESTABLISHED even after Hypercorn tries to close the writer.
Of course, if the HTTP client responds to the TLS termination by closing the socket from the client's side, it will get closed, but otherwise, the socket will remain open.
Maybe we want to fix this.
The text was updated successfully, but these errors were encountered:
The
keep_alive_timeout
config does cause the TLS stream to be terminated, but it won't close the underlying socket, which remains in the ESTABLISHED state.This was discovered while troubleshooting an httpx issue. See: encode/httpx#2983
Of course, if the HTTP client responds to the TLS termination by closing the socket from the client's side, it will get closed, but otherwise, the socket will remain open.
Maybe we want to fix this.
The text was updated successfully, but these errors were encountered: