Signed-off-by: Mike Beattie <mike@ethernal.org>
}
}
- private void connection_failed() {
+ private void connection_lost() {
if (D) Log.e(TAG, "Connection lost during I/O");
handler.obtainMessage(TelemetryService.MSG_DISCONNECTED).sendToTarget();
}
output.write(bytes);
if (D) Log.d(TAG, "print(): Wrote bytes: '" + data.replace('\n', '\\') + "'");
} catch (IOException e) {
- connection_failed();
+ connection_lost();
} catch (InterruptedException e) {
- connection_failed();
+ connection_lost();
}
}
wait_connected();
return input.read();
} catch (IOException e) {
- connection_failed();
+ connection_lost();
} catch (java.lang.InterruptedException e) {
- connection_failed();
+ connection_lost();
}
return AltosLink.ERROR;
}