Fixed timeout issues that occurred sometimes when connecting to the printer

This commit is contained in:
Gina Haeussge authored and Gina Häußge committed 2013-01-18 23:44:09 +01:00
1 parent 574961ceac
commit 49f7568de2
1 file changed
+1 -1
+1 -1
View File
@@ -388,7 +388,7 @@ class MachineCom(object):
self._sendCommand("M105")
elif 'ok' in line:
self._changeState(self.STATE_OPERATIONAL)
if time.time() > timeout:
elif time.time() > timeout:
self.close()
elif self._state == self.STATE_OPERATIONAL:
#Request the temperature on comm timeout (every 2 seconds) when we are not printing.