diff --git a/inventree_phomemo/server.py b/inventree_phomemo/server.py index 01dcdbf..1f51e09 100644 --- a/inventree_phomemo/server.py +++ b/inventree_phomemo/server.py @@ -11,13 +11,12 @@ s.listen(1) while True: conn, addr = s.accept() print(addr) + printer = open('test.png', 'wb') while True: - data = conn.recv(9100) + data = conn.recv(91000) print('data received') print('Sending to printer...') - - printer=open('test.png','wb') printer.write(data) - printer.close() if not data: - break \ No newline at end of file + break + printer.close() \ No newline at end of file