Skip to content

Commit

Permalink
Reset "node wait" alarm when breaking from the event loop
Browse files Browse the repository at this point in the history
... if an alarm was set before looping.

In theory, we could raise a KeyboardInterrupt after the matching event was found.
  • Loading branch information
cvaroqui committed Nov 6, 2019
1 parent ccb528e commit 2c3ca44
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/node.py
Expand Up @@ -3565,6 +3565,8 @@ def alarm_handler(signum, frame):
elif kind == "event":
if match_event(patch):
break
if duration:
signal.alarm(0)

def events(self, server=None):
try:
Expand Down

0 comments on commit 2c3ca44

Please sign in to comment.