mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 16:55:15 +00:00
grid2: prevent infinite loop
This commit is contained in:
parent
ae20cef8f4
commit
8715d0aca9
|
@ -1036,7 +1036,8 @@ func (s *Strategy) recoverGrid(ctx context.Context, historyService types.Exchang
|
|||
return err
|
||||
}
|
||||
|
||||
if len(closedOrders) == 0 {
|
||||
// need to prevent infinite loop for: len(closedOrders) == 1 and it's creationTime = startTime
|
||||
if len(closedOrders) == 0 || len(closedOrders) == 1 && closedOrders[0].CreationTime.Time().Equal(startTime) {
|
||||
break
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user