usbmuxd
usbmuxd copied to clipboard
USBMUX fails to send TCP ACK when bombarded with data
Almost certainly related to #19 I have observed an issue where USBMUXd will fail to send back TCP ACKs when bombarded with data from the iOS device faster than the server application can read from it.
We're able to reproduce this issue 100% of the time when sending 100MB of data, broken down into 4KB chunks. The iOS device will write as fast as it can, up until its output buffer fills up. Examining the code I see two potential issues:
https://github.com/libimobiledevice/usbmuxd/blob/master/src/device.c#L328
If the ib_size
is 0, shouldn't we be sending an ACK here?
https://github.com/libimobiledevice/usbmuxd/blob/master/src/device.c#L672
Shouldn't the ACK be the sequence + 1?
Still an issue?
Not sure if the two mentioned things in the code are really a problem, but there is definitely a problem with ACKs going on as mentioned in #19. Fix is being tested :)