proxyutils: Disable serial timeout for writemem_compressed

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2021-05-06 03:32:39 +09:00
parent 0ae3455d51
commit bbbea9db34

View file

@ -92,7 +92,12 @@ class ProxyUtils(object):
with self.heap.guarded_malloc(compressed_size) as compressed_addr:
self.iface.writemem(compressed_addr, payload, progress)
decompressed_size = self.proxy.xzdec(compressed_addr, compressed_size, dest, len(data))
timeout = self.iface.dev.timeout
self.iface.dev.timeout = None
try:
decompressed_size = self.proxy.xzdec(compressed_addr, compressed_size, dest, len(data))
finally:
self.iface.dev.timeout = timeout
assert decompressed_size == len(data)