mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
bbgo: register onShutdown from the trader
This commit is contained in:
parent
76b0f5518d
commit
77ca1a9c75
|
@ -221,8 +221,7 @@ func (trader *Trader) RunSingleExchangeStrategy(ctx context.Context, strategy Si
|
|||
}
|
||||
|
||||
if shutdown, ok := strategy.(StrategyShutdown); ok {
|
||||
// Register the shutdown callback
|
||||
OnShutdown(shutdown.Shutdown)
|
||||
trader.gracefulShutdown.OnShutdown(shutdown.Shutdown)
|
||||
}
|
||||
|
||||
return strategy.Run(ctx, orderExecutor, session)
|
||||
|
|
Loading…
Reference in New Issue
Block a user