Skip to content

Commit

Permalink
fix: nil pointer when quitting simd start (#13743)
Browse files Browse the repository at this point in the history
* fix: nil pointer when quitting `simd start`
* log error
  • Loading branch information
julienrbrt committed Nov 3, 2022
1 parent ad0e41d commit 27f9851
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 34 deletions.
1 change: 0 additions & 1 deletion scripts/mockgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ $mockgen_cmd -source=client/account_retriever.go -package mock -destination test
$mockgen_cmd -package mock -destination testutil/mock/tendermint_tm_db_DB.go github.com/tendermint/tm-db DB
$mockgen_cmd -source=types/module/module.go -package mock -destination testutil/mock/types_module_module.go
$mockgen_cmd -source=types/invariant.go -package mock -destination testutil/mock/types_invariant.go
$mockgen_cmd -source=types/router.go -package mock -destination testutil/mock/types_router.go
$mockgen_cmd -package mock -destination testutil/mock/grpc_server.go github.com/cosmos/gogoproto/grpc Server
$mockgen_cmd -package mock -destination testutil/mock/tendermint_tendermint_libs_log_DB.go github.com/tendermint/tendermint/libs/log Logger
$mockgen_cmd -source=orm/model/ormtable/hooks.go -package ormmocks -destination orm/testing/ormmocks/hooks.go
Expand Down
8 changes: 7 additions & 1 deletion server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,13 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App
if fn != nil {
fn()
}
traceWriter.Close()

// if flagTraceStore is not used then traceWriter is nil
if traceWriter != nil {
if err = traceWriter.Close(); err != nil {
ctx.Logger.Error("failed to close trace writer", "err", err)
}
}
}

config, err := serverconfig.GetConfig(ctx.Viper)
Expand Down
32 changes: 0 additions & 32 deletions testutil/mock/types_router.go

This file was deleted.

0 comments on commit 27f9851

Please sign in to comment.