Skip to content

Commit

Permalink
brother_ql_print network backend timeout fix (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
pklaus committed Oct 18, 2017
1 parent e27bc9d commit 69d8b03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion brother_ql/backends/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def __init__(self, device_specifier):
raise NotImplementedError('Currently the printer can be specified either via an appropriate string or via an os.open() handle.')

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):
if self.strategy in ('socket_timeout', 'try_twice'):
Expand Down

0 comments on commit 69d8b03

Please sign in to comment.