[FIX] hw_escpos: don't try too hard to close a printer
Although it might be a good idea to make sure a printer device is properly closed, trying for >1 min to do so is too much. It can cause a >1 min delay between receiving a receipt and actually printing. Also, just because the device is not cleanly closed does not mean that it will not work when we open it again.
This commit is contained in:
@@ -58,7 +58,7 @@ class Usb(Escpos):
|
||||
return True
|
||||
except usb.core.USBError as e:
|
||||
i += 1
|
||||
if i > 100:
|
||||
if i > 10:
|
||||
return False
|
||||
|
||||
sleep(0.1)
|
||||
|
||||
Reference in New Issue
Block a user