Skip to content

Commit

Permalink
Fix issue with timer starting after stop() is called. Now it doesn't …
Browse files Browse the repository at this point in the history
…start in this situation.
  • Loading branch information
ionelmc committed Mar 22, 2014
1 parent 620828c commit c353c80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion celery/utils/timer2.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def run(self):
os._exit(1)

def stop(self):
self._is_shutdown.set()
if self.running:
self._is_shutdown.set()
self._is_stopped.wait()
self.join(THREAD_TIMEOUT_MAX)
self.running = False
Expand Down

0 comments on commit c353c80

Please sign in to comment.