fix: add missing close when graceful shutdown (#25632)
Co-authored-by: Alex | Cosmos Labs <alex@cosmoslabs.io>
This commit is contained in:
parent
65f680946c
commit
3516334ebb
@ -73,6 +73,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
* (collections) [#25464](https://github.com/cosmos/cosmos-sdk/pull/25464) Add `IterateRaw` method to `Multi` index type to satisfty query `Collection` interface.
|
||||
* (x/mint) [#25562](https://github.com/cosmos/cosmos-sdk/pull/25562) Improve and test `x/mint` params validation.
|
||||
* (api) [#25613](https://github.com/cosmos/cosmos-sdk/pull/25613) Separated deprecated modules into the contrib directory, distinct from api, to enable and unblock new proto changes without affecting legacy code.
|
||||
* (server) [#25632](https://github.com/cosmos/cosmos-sdk/pull/25632) Add missing call to close the app on shutdown.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package server
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
@ -304,7 +305,7 @@ func startStandAlone(svrCtx *Context, svrCfg serverconfig.Config, clientCtx clie
|
||||
// so we can gracefully stop the ABCI server.
|
||||
<-ctx.Done()
|
||||
svrCtx.Logger.Info("stopping the ABCI server...")
|
||||
return svr.Stop()
|
||||
return errors.Join(svr.Stop(), app.Close())
|
||||
})
|
||||
|
||||
return g.Wait()
|
||||
@ -400,6 +401,7 @@ func startCmtNode(
|
||||
cleanupFn = func() {
|
||||
if tmNode != nil && tmNode.IsRunning() {
|
||||
_ = tmNode.Stop()
|
||||
_ = app.Close()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user