brother_ql_print network backend timeout fix (#23)
This commit is contained in:
@@ -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'):
|
||||||
|
|||||||
Reference in New Issue
Block a user