mirror of
https://github.com/alexgo-io/gaze-indexer.git
synced 2026-04-30 12:41:59 +08:00
fix: move stop() inside goroutine
This commit is contained in:
@@ -117,10 +117,9 @@ func runHandler(opts *runCmdOptions, cmd *cobra.Command, _ []string) error {
|
||||
if err := bitcoinIndexer.Run(ctx); err != nil {
|
||||
logger.ErrorContext(ctx, "Failed to run Bitcoin Indexer", slogx.Error(err))
|
||||
}
|
||||
// stop main process if Bitcoin Indexer failed
|
||||
stop()
|
||||
}()
|
||||
|
||||
// stop main process if Bitcoin Indexer failed
|
||||
stop()
|
||||
}
|
||||
|
||||
// Wait for interrupt signal to gracefully stop the server with
|
||||
|
||||
Reference in New Issue
Block a user