brother_ql_print network backend timeout fix (#23)

This commit is contained in:
Philipp Klaus
2017-10-18 23:55:52 +02:00
parent e27bc9d491
commit 69d8b0395f
+3 -1
View File
@@ -63,7 +63,9 @@ class BrotherQLBackendNetwork(BrotherQLBackendGeneric):
raise NotImplementedError('Currently the printer can be specified either via an appropriate string or via an os.open() handle.') raise NotImplementedError('Currently the printer can be specified either via an appropriate string or via an os.open() handle.')
def _write(self, data): def _write(self, data):
self.s.send(data) self.s.settimeout(10)
self.s.sendall(data)
self.s.settimeout(self.read_timeout)
def _read(self, length=32): def _read(self, length=32):
if self.strategy in ('socket_timeout', 'try_twice'): if self.strategy in ('socket_timeout', 'try_twice'):