diff --git a/bonesis/views.py b/bonesis/views.py index 7079871..e07baa2 100644 --- a/bonesis/views.py +++ b/bonesis/views.py @@ -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)