Skip to content

Commit

Permalink
Fixes a race condition causing stalls when pausing/cancelling
Browse files Browse the repository at this point in the history
Closes #2581 & closes #2587
  • Loading branch information
foosel committed Apr 18, 2018
1 parent 472ab36 commit bf3da2a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/octoprint/util/comm.py
Expand Up @@ -1140,6 +1140,7 @@ def _on_M400_sent():

if self._log_position_on_cancel and not disable_log_position:
self.sendCommand("M400", on_sent=_on_M400_sent, tags=tags | {"trigger:comm.cancel", "trigger:record_position"})
self._continue_sending()
else:
self._cancel_preparation_done()

Expand Down Expand Up @@ -1205,6 +1206,7 @@ def _on_M400_sent():

if self._log_position_on_pause:
self.sendCommand("M400", on_sent=_on_M400_sent, tags=tags | {"trigger:comm.set_pause", "trigger:pause", "trigger:record_position"})
self._continue_sending()
else:
self._pause_preparation_done()

Expand Down

0 comments on commit bf3da2a

Please sign in to comment.