diff --git a/cmd/replication/main.go b/cmd/replication/main.go index 0316843d..f1ffa4df 100644 --- a/cmd/replication/main.go +++ b/cmd/replication/main.go @@ -60,13 +60,13 @@ func main() { tracing.GoPanicWrap(ctx, &wg, "main", func(ctx context.Context) { var dbInstance *sql.DB if options.Replication.Enable || options.Sync.Enable || options.Indexer.Enable { - dbInstance, err := db.NewNamespacedDB( - ctx, - options.DB.WriterConnectionString, - utils.BuildNamespace(options), - options.DB.WaitForDB, - options.DB.ReadTimeout, - ) + dbInstance, err = db.NewNamespacedDB( + ctx, + options.DB.WriterConnectionString, + utils.BuildNamespace(options), + options.DB.WaitForDB, + options.DB.ReadTimeout, + ) if err != nil { logger.Fatal("initializing database", zap.Error(err))