Skip to content

Commit

Permalink
shut down resolution when limit is reached
Browse files Browse the repository at this point in the history
Fixes #3
  • Loading branch information
pauleve committed Jan 23, 2024
1 parent 100e857 commit a54fa4c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bonesis/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def _intermediate_model_found(self, model):

def __next__(self):
if self.limit and self._counter >= self.limit:
self._solve_handler.cancel()
raise StopIteration

self.cur_model = next(self._iterator)
Expand Down

0 comments on commit a54fa4c

Please sign in to comment.