From: Nathaniel Wesley Filardo Date: Sun, 28 Oct 2018 14:13:12 +0000 (+0000) Subject: Improve debug logging X-Git-Tag: release-1.2~8 X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=dfcd2df6792944bc6dd6028d526896232b300cea;p=acmetensortoys-ctfws-android Improve debug logging --- diff --git a/mobile/src/main/java/com/acmetensortoys/ctfwstimer/MainService.java b/mobile/src/main/java/com/acmetensortoys/ctfwstimer/MainService.java index 6f327ca..313af23 100644 --- a/mobile/src/main/java/com/acmetensortoys/ctfwstimer/MainService.java +++ b/mobile/src/main/java/com/acmetensortoys/ctfwstimer/MainService.java @@ -154,11 +154,14 @@ public class MainService extends Service { @Override public void onFailure(IMqttToken asyncActionToken, Throwable exception) { - Log.e("CtFws", "Conn Fail", exception); - if (asyncActionToken.getClient().equals(mMqc)) { + if (asyncActionToken.getClient().isConnected()) { + Log.d("CtFwS", "Spurious connection failure?", exception); + } + else if (asyncActionToken.getClient().equals(mMqc)) { + Log.e("CtFws", "Conn Fail", exception); setMSE(MqttServerEvent.MSE_DISCONN); } else { - Log.d("Service", "IS STALE DISCONN"); + Log.d("CtFwS", "Stale connection failure message"); } } };