--- a/Utilities/BackgroundService.py Sun Sep 03 19:08:22 2017 +0200 +++ b/Utilities/BackgroundService.py Sun Sep 03 19:16:43 2017 +0200 @@ -161,9 +161,10 @@ packedData = b'' while len(packedData) < length: - # this wait influences speed in batch mode (smaller is faster) - connection.waitForReadyRead(5) - packedData += connection.read(length - len(packedData)) + maxSize = length - len(packedData) + if connection.bytesAvailable() < maxSize: + connection.waitForReadyRead(50) + packedData += connection.read(maxSize) assert adler32(packedData) & 0xffffffff == datahash, \ 'Hashes not equal'