diff options
author | Keith Packard <keithp@keithp.com> | 2010-11-22 15:53:27 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-11-22 15:53:27 -0800 |
commit | 68323cbb222f1f33198a42abaa0550af22f75a93 (patch) | |
tree | 8fd016b466ac2d1b456538366dba46019d752f78 /ao-tools | |
parent | 377ee7e90ecd028f984cd1abce96b2efc3b5b977 (diff) |
altosui: Close serial port when debug link fails
If the debug connection isn't working, close down the serial port when
reporting the failure.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools')
-rw-r--r-- | ao-tools/altosui/AltosFlash.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ao-tools/altosui/AltosFlash.java b/ao-tools/altosui/AltosFlash.java index fa2465d3..3af25c23 100644 --- a/ao-tools/altosui/AltosFlash.java +++ b/ao-tools/altosui/AltosFlash.java @@ -336,7 +336,9 @@ public class AltosFlash { debug = new AltosDebug(in_debug_dongle); input = new FileInputStream(file); image = new AltosHexfile(input); - if (!debug.check_connection()) + if (!debug.check_connection()) { + debug.close(); throw new IOException("Debug port not connected"); + } } }
\ No newline at end of file |