mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
strategy/grid: use background context for canceling orders
This commit is contained in:
parent
9953a30717
commit
9bdc05b69c
|
@ -616,7 +616,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
|
|||
|
||||
// now we can cancel the open orders
|
||||
log.Infof("canceling active orders...")
|
||||
if err := session.Exchange.CancelOrders(ctx, s.activeOrders.Orders()...); err != nil {
|
||||
if err := session.Exchange.CancelOrders(context.Background(), s.activeOrders.Orders()...); err != nil {
|
||||
log.WithError(err).Errorf("cancel order error")
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user