1
0
Fork 0

Merge pull request #1252 from rqlite/stop-http-fast

Stop the HTTP server first on shutdown
master
Philip O'Toole 1 year ago committed by GitHub
commit f306670c69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,3 +1,7 @@
## 7.16.1 (unreleased)
### Implementation changes and bug fixes
- [PR #1252](https://github.com/rqlite/rqlite/pull/1252): Stop the HTTP server first on shutdown.
## 7.16.0 (May 5th 2023) ## 7.16.0 (May 5th 2023)
### New features ### New features
- [PR #1243](https://github.com/rqlite/rqlite/pull/1243): Support automatically restoring from AWS S3. Thanks to [VOXO](https://voxo.co/) for funding this development. - [PR #1243](https://github.com/rqlite/rqlite/pull/1243): Support automatically restoring from AWS S3. Thanks to [VOXO](https://voxo.co/) for funding this development.

@ -194,6 +194,10 @@ func main() {
signal.Notify(terminate, syscall.SIGINT, syscall.SIGTERM, os.Interrupt) signal.Notify(terminate, syscall.SIGINT, syscall.SIGTERM, os.Interrupt)
<-terminate <-terminate
// Stop the HTTP server first, so clients get notification as soon as
// possible that the node is going away.
httpServ.Close()
if cfg.RaftStepdownOnShutdown { if cfg.RaftStepdownOnShutdown {
if str.IsLeader() { if str.IsLeader() {
// Don't log a confusing message if not (probably) Leader // Don't log a confusing message if not (probably) Leader
@ -204,7 +208,6 @@ func main() {
} }
backupSrvCancel() backupSrvCancel()
httpServ.Close()
if err := str.Close(true); err != nil { if err := str.Close(true); err != nil {
log.Printf("failed to close store: %s", err.Error()) log.Printf("failed to close store: %s", err.Error())
} }

Loading…
Cancel
Save