use OnStart instead of OnConnect

this is for avoiding re-connect issue
This commit is contained in:
c9s 2021-03-15 18:04:55 +08:00
parent e311a182fa
commit 2bf4a555ec

View File

@ -367,7 +367,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
})
session.Stream.OnTradeUpdate(s.tradeUpdateHandler)
session.Stream.OnConnect(func() {
session.Stream.OnStart(func() {
s.placeGridOrders(orderExecutor, session)
})