fix: preserve database compatibility and harden request lifecycles

This commit is contained in:
jason jia
2026-10-17 01:29:51 +00:00
parent 5e496b35f1
commit 984b98e61b
24 changed files with 687 additions and 202 deletions
+3
View File
@@ -355,6 +355,9 @@ func (m *serverManager) drain(s *http.Server) {
if s == nil {
return
}
// Stop reusing old connections before Reload returns. Asynchronous Shutdown
// alone leaves a window where a client receives the previous HTTP/TLS mode.
s.SetKeepAlivesEnabled(false)
go func(s *http.Server) {
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
defer cancel()