blaze icon indicating copy to clipboard operation
blaze copied to clipboard

Pause before close to avoid TIME_WAIT

Open rossabaker opened this issue 1 year ago • 2 comments

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

rossabaker avatar Nov 02 '24 01:11 rossabaker

I haven't researched this yet, but Section 9.6 of RFC 9112 is probably what we want to do.

rossabaker avatar Nov 02 '24 01:11 rossabaker

IIRC shutdownOutput in Socket/SocketChannel were introduced to support exactly this scenario.

milessabin avatar Nov 02 '24 08:11 milessabin