parallaxinc / PropLoader

Parallax Propeller loader supporting both serial and wifi downloads
MIT License
27 stars 13 forks source link

Download request does not fail gracefully #9

Closed PropGit closed 8 years ago

PropGit commented 8 years ago

When the target module does not exist, proploader continues through protocol even when it can't possibly succeed (download requests, name requests). In addition, it takes > 42 seconds (on Windows) to finish the download request that has failed in this manner.

For example, when 192.168.1.118 doesn't exist, the command proploader -i 192.168.1.118 PABWX-Blink#4.binary causes the following response:

Loading 'PABWX-Blink#4.binary'

for 21 seconds. Then the following:

connect failed
Loading second-stage loader

for another 21 seconds. Then the following:

connect failed
error: connect failed
error: set-baud-rate request failed
error: load failed: -1

Please make it

dbetz commented 8 years ago

Added a 2 second timeout for the target connection after which a load will fail.