blaze
blaze copied to clipboard
Pause before close to avoid TIME_WAIT
Maybe a bit off-topic for this PR, but when returning a Connection: close do you pause before closing to allow the client to do an active close avoiding TIME_WAIT on the server side?
Originally posted by @milessabin in https://github.com/http4s/blaze/issues/913#issuecomment-2437347922
I haven't researched this yet, but Section 9.6 of RFC 9112 is probably what we want to do.
IIRC shutdownOutput in Socket/SocketChannel were introduced to support exactly this scenario.