valyala / fasthttp

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http
MIT License
21.84k stars 1.76k forks source link

Feature Request: force shutdown of server #1389

Open pjebs opened 2 years ago

pjebs commented 2 years ago

See https://github.com/gofiber/fiber/issues/2087

The ability to force shutdown a server if graceful shutdown takes too long (based on configurable time duration)

pjebs commented 2 years ago

Maybe something like this: https://pkg.go.dev/net/http#Server.Close if it's taking too long to gracefully shutdown.

erikdubbelboer commented 2 years ago

In theory you can just close the listener, and keep a list of connections using Server.ConnState and close those as well.