From 69a8a6bc0edb6342fae3d031f0c48c78d9de4465 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 18 Jun 2021 14:43:09 -0700 Subject: [PATCH] fix(lotus-sim): lint --- cmd/lotus-sim/info_message.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/lotus-sim/info_message.go b/cmd/lotus-sim/info_message.go index b30fadd65e4..33c45e7280f 100644 --- a/cmd/lotus-sim/info_message.go +++ b/cmd/lotus-sim/info_message.go @@ -22,12 +22,16 @@ var infoMessageSizeSimCommand = &cli.Command{ Value: 0, }, }, - Action: func(cctx *cli.Context) error { + Action: func(cctx *cli.Context) (err error) { node, err := open(cctx) if err != nil { return err } - defer node.Close() + defer func() { + if cerr := node.Close(); err == nil { + err = cerr + } + }() go profileOnSignal(cctx, syscall.SIGUSR2)