Old connections drop while in use.
karmakaze opened this issue · comments
It seems that there's an undocumented 20 second grace limit for completing old requests.
It would be great to let folks know that this behavior is present and how to override it. Perhaps toward the end of the README.
e.g.
In place of
if err := graceful.ListenAndServe(addr, handler); err != nil {
log.Fatal(err)
}
do
server := graceful.NewServer(graceful.WithStopTimeout(time.Duration(4 * time.Hour)))
server.Register(addr, handler)
if err := server.Run(); err != nil {
log.Fatal(err)
}
Documented. Thanks for your proposal.
Awesome library! Working beautifully. Other than having to override the timeout, it works flawlessly as a drop-in replacement. [I just remembered another idea, opening a new feature issue]