libimobiledevice/usbmuxd — pull request #17 by Lekensteyn (2014-04-19 23:24:16+00:00)
Title: Fix connection abort if device buffer is full

When trying to upload a IPSW filesystem to an iPad, the process would
randomly stop somewhere at 3% or 10%. It is possible that the receive
buffer of the iPad is full. To prevent erroring out because size ==
conn->sendable == 0, skip reading from the client.

There is a similar case where the clients is ready to accept data, but
the device has no data to send. Apply a similar fix there.

Hopefully the device is fast enough to reply in the next main loop
iteration, otherwise the CPU usage of usbmux will spike because the
client socket is ready while there is no data to process...
---
Credits to https://gist.github.com/brianairb/11096061, mentioned by cai_ at Freenode IRC.

I've now successfully updated the firmware to 7.1.