Skip to content

Commit

Permalink
refactor: cleanup profiling code with equivalent one (cosmos#16634)
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Jun 21, 2023
1 parent a827f42 commit c63d5fa
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,12 +549,7 @@ func wrapCPUProfile(svrCtx *Context, callbackFn func() error) error {
}()
}

errCh := make(chan error)
go func() {
errCh <- callbackFn()
}()

return <-errCh
return callbackFn()
}

// emitServerInfoMetrics emits server info related metrics using application telemetry.
Expand Down

0 comments on commit c63d5fa

Please sign in to comment.