Interpret wait during connect fully as ok
Otherwise we might switch to connected state but lack an acknowledgement to send the next lines and stay in a wait cycle. Also related to #1770
This commit is contained in:
parent
7f0eb8d895
commit
9f963696c8
1 changed files with 3 additions and 0 deletions
|
|
@ -1384,6 +1384,9 @@ class MachineCom(object):
|
|||
startSeen = True
|
||||
self.sayHello()
|
||||
elif line.startswith("ok") or (supportWait and line == "wait"):
|
||||
if line == "wait":
|
||||
# if it was a wait we probably missed an ok, so let's simulate that now
|
||||
self._handle_ok()
|
||||
self._onConnected()
|
||||
elif time.time() > self._timeout:
|
||||
self._log("There was a timeout while trying to connect to the printer")
|
||||
|
|
|
|||
Loading…
Reference in a new issue