Skip to content
This repository has been archived by the owner on Mar 6, 2022. It is now read-only.

Commit

Permalink
Reset cycle count on kill
Browse files Browse the repository at this point in the history
  • Loading branch information
maltekliemann committed Jun 16, 2021
1 parent e231583 commit bb9db3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/rogue/rogue.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def exec(self):

def kill(self):
self._daemon.kill()
self._cycle_count = 0

def process_errors(self):
self._daemon.process_errors()
4 changes: 2 additions & 2 deletions tests/test_rogue.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ def loop(client):
def test_restart(self):
server = rogue.Server()
server.exec()
time.sleep(0.01)
time.sleep(0.09)
server.kill()
time.sleep(0.01)
assert server._cycle_count == 0
server.exec()
time.sleep(0.01)
server.process_errors()

0 comments on commit bb9db3d

Please sign in to comment.