diff options
author | Keith Packard <keithp@keithp.com> | 2011-08-13 21:10:15 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-08-13 21:10:15 -0700 |
commit | 924d56a4d2d8b16530cd378b18cfc5d6e08420ed (patch) | |
tree | 5ef26000b726f86d861c9838f706382df72d2a36 /altosui/AltosEepromDownload.java | |
parent | dcd15032eec45f3fdd003050710ebd5b85052662 (diff) |
altos: AltosSerial.flush_input shouldn't discard Interrupted exceptions
The eeprom download code wants to interrupt serial communication so
that it can stop downloading stuff in the middle of a run. Make
flush_input pass the exception along instead of discarding it.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosEepromDownload.java')
-rw-r--r-- | altosui/AltosEepromDownload.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/altosui/AltosEepromDownload.java b/altosui/AltosEepromDownload.java index b44a1451..358ad337 100644 --- a/altosui/AltosEepromDownload.java +++ b/altosui/AltosEepromDownload.java @@ -373,8 +373,12 @@ public class AltosEepromDownload implements Runnable { "Connection Failed", JOptionPane.ERROR_MESSAGE); } finally { - if (remote) - serial_line.stop_remote(); + if (remote) { + try { + serial_line.stop_remote(); + } catch (InterruptedException ie) { + } + } serial_line.flush_output(); } monitor.done(); |