xmaker: reset book after emitting reconnect

This commit is contained in:
c9s 2024-11-08 08:37:08 +08:00
parent eb91f9d77f
commit fc322079ba
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -655,8 +655,8 @@ func (s *Strategy) updateQuote(ctx context.Context) error {
s.Symbol, s.Symbol,
time.Since(bookLastUpdateTime)) time.Since(bookLastUpdateTime))
s.sourceBook.Reset()
s.sourceSession.MarketDataStream.Reconnect() s.sourceSession.MarketDataStream.Reconnect()
s.sourceBook.Reset()
return err return err
} }
@ -665,8 +665,8 @@ func (s *Strategy) updateQuote(ctx context.Context) error {
s.Symbol, s.Symbol,
time.Since(bookLastUpdateTime)) time.Since(bookLastUpdateTime))
s.sourceBook.Reset()
s.sourceSession.MarketDataStream.Reconnect() s.sourceSession.MarketDataStream.Reconnect()
s.sourceBook.Reset()
return err return err
} }