summaryrefslogtreecommitdiff
path: root/altosui/AltosEepromDelete.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-08-13 21:10:15 -0700
committerKeith Packard <keithp@keithp.com>2011-08-13 21:10:15 -0700
commit924d56a4d2d8b16530cd378b18cfc5d6e08420ed (patch)
tree5ef26000b726f86d861c9838f706382df72d2a36 /altosui/AltosEepromDelete.java
parentdcd15032eec45f3fdd003050710ebd5b85052662 (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/AltosEepromDelete.java')
-rw-r--r--altosui/AltosEepromDelete.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/altosui/AltosEepromDelete.java b/altosui/AltosEepromDelete.java
index cd9abfab..a9d77788 100644
--- a/altosui/AltosEepromDelete.java
+++ b/altosui/AltosEepromDelete.java
@@ -104,10 +104,14 @@ public class AltosEepromDelete implements Runnable {
serial_line.device.toShortString()),
"Connection Failed");
} finally {
- if (remote)
- serial_line.stop_remote();
- serial_line.flush_output();
- serial_line.close();
+ try {
+ if (remote)
+ serial_line.stop_remote();
+ } catch (InterruptedException ie) {
+ } finally {
+ serial_line.flush_output();
+ serial_line.close();
+ }
}
if (listener != null) {
Runnable r = new Runnable() {