If the debug connection isn't working, close down the serial port when
reporting the failure.
Signed-off-by: Keith Packard <keithp@keithp.com>
debug = new AltosDebug(in_debug_dongle);
input = new FileInputStream(file);
image = new AltosHexfile(input);
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");
throw new IOException("Debug port not connected");
}
}
\ No newline at end of file
}
}
\ No newline at end of file