altos: AltosSerial.flush_input shouldn't discard Interrupted exceptions
[fw/altos] / altosui / AltosEepromDelete.java
index cd9abfabc02fcf3b00e25f8324cb9f35ca6bd67c..a9d77788d06f84be4800ae0d8d4fb4255bb6ff99 100644 (file)
@@ -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() {