Skip to content

Commit

Permalink
fix(note_validator): Restart the timeout if there is activity
Browse files Browse the repository at this point in the history
Otherwise it might trigger a timeout while a bill is currently
processed.

Closes muccc#9
  • Loading branch information
schneider42 committed Feb 2, 2015
1 parent 5024e1d commit 38752d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fnordload/note_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ def read_note(self, timeout = 30, message_callback = lambda x: None):
elif (len(poll) > 1 and poll[0] == '0xf0'):
self._logger.warning(str(poll))

if len(poll) > 1:
# The bill acceptor is not idle. Restart the timeout
t0 = time.time()

with self._essp_lock:
self._eSSP.disable()

Expand Down

0 comments on commit 38752d4

Please sign in to comment.