From e26306c9350ef1d107d4257ef1c09d15165c9154 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Dec 2013 01:14:11 -0800 Subject: altoslib: Pass InterruptedException up the stack instead of hiding it When interrupting a thread that is talking to a serial device, it's important not to have that thread discard the InterruptedException so that it will actually terminate. This patch removes a bunch of places that were discarding InterruptedExceptions and lets higher level code see them so that they can exit cleanly. Signed-off-by: Keith Packard --- altoslib/AltosIdleFetch.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'altoslib/AltosIdleFetch.java') diff --git a/altoslib/AltosIdleFetch.java b/altoslib/AltosIdleFetch.java index 64c421f4..4adc6c41 100644 --- a/altoslib/AltosIdleFetch.java +++ b/altoslib/AltosIdleFetch.java @@ -125,7 +125,7 @@ public class AltosIdleFetch implements AltosStateUpdate { double frequency; String callsign; - public void update_state(AltosState state) { + public void update_state(AltosState state) throws InterruptedException { try { AltosConfigData config_data = new AltosConfigData(link); state.set_state(AltosLib.ao_flight_startup); @@ -140,7 +140,6 @@ public class AltosIdleFetch implements AltosStateUpdate { } } state.set_received_time(System.currentTimeMillis()); - } catch (InterruptedException ie) { } catch (TimeoutException te) { } -- cgit v1.2.3