Pinoccio / chrome-app-pinoccio

1 stars 4 forks source link

Retry packets on timeouts and other failures #31

Open matthijskooijman opened 9 years ago

matthijskooijman commented 9 years ago

In an attempt to fix Pinoccio/server-hq#191, this PR adds retries for pagedWrite commands. It's completely untested and should probably be generalized, but it might just work...

@jingman, @quartzjer, could you have a go with this code? I'm out of time for today (and probably tomorrow too).

matthijskooijman commented 9 years ago

This PR also lowers the timeout to 500ms, but there's a chance that's not enough for the signon command, so that should get a higher timeout or also retries (OTOH, if the bootloader isn't running yet by the time the signon command is sent, increasing the timeout doesn't actually help, so it's probably fine like this).