-
Notifications
You must be signed in to change notification settings - Fork 2
go 1.8 has http shutdown draining(but not for Hijacked connections) #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks @joeblew99 Yes I am aware 1.8 intends to have graceful shutdown, but doesn't yet handle Hijacked connection(WebSockets etc...) but this library does, please see: There is a viable workaround and I fully believe they will implement something in the future to handle this, but not in Go 1.8. When Go 1.8 is released I may adjust this libs backend accordingly, without any breaking changes, to let the STD lib handle the idle connections as they have lower level access than I have but still handle Hijacked connections. Besides this is not just a graceful http shutdown lib, but also a net.Listener graceful shutdown for RPC and other lower level protocols and it also allows glueing together of many things for example I have a Web App that I need graceful shutdown of http including WebSocket connections, some simple CRON jobs and some other processes that are initiated by an http request but are not tied to the request itself(running in goroutine) and this library allows me to gracefully shutdown all of that using just a few lines of code. 😄 Additional: I could be wrong but I also haven't seen that the STD lib will listen for a shutdown signal, but rather exposed a function on the http.Server called Shutdown() |
@joeybloggs thanks for explaining your use case. |
thanks @joeblew99 in case your interested, yesterday I added functionality to provide a custom signal func https://github.com/go-playground/kms/releases/tag/v1.1.0 |
thanks i will give it a whirl, and come back with any issues i see. On Fri, Nov 11, 2016 at 2:38 PM Dean Karn [email protected] wrote:
|
this is nice stuff.
I noticed on the forums that go 1.8 has first class support to do draing of connections for http servers now when it gets a shutdown signal.
just thought i should mention it, because i think there might be some impact on your lib, but honestly i have not looked deeper into it.
The text was updated successfully, but these errors were encountered: