Skip to content

Commit

Permalink
fix err check
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Aug 16, 2022
1 parent fc3d7c6 commit 667f441
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,9 @@ func start(ctx context.Context) (*defraInstance, error) {
if err := s.Run(); err != nil && !errors.Is(err, http.ErrServerClosed) {
log.FeedbackErrorE(ctx, "Failed to run the HTTP server", err)
if n != nil {
err := n.Close()
log.FeedbackErrorE(ctx, "Failed to close node", err)
if err := n.Close(); err != nil {
log.FeedbackErrorE(ctx, "Failed to close node", err)
}
}
db.Close(ctx)
os.Exit(1)
Expand Down

0 comments on commit 667f441

Please sign in to comment.