http4s / blaze

Blazing fast NIO microframework and Http Parser
Apache License 2.0
350 stars 63 forks source link

Pause before close to avoid TIME_WAIT #918

Open rossabaker opened 2 hours ago

rossabaker commented 2 hours ago

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 commented 2 hours ago

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