]> hydra-www.ietfng.org Git - acmetensortoys-ctfws-android/commitdiff
Improve debug logging
authorNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sun, 28 Oct 2018 14:13:12 +0000 (14:13 +0000)
committerNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sun, 28 Oct 2018 14:13:43 +0000 (14:13 +0000)
mobile/src/main/java/com/acmetensortoys/ctfwstimer/MainService.java

index 6f327ca1a298c5e145d3677963b8ae02ad8b605b..313af236a3d4c4509ef19913a739268953fd6f05 100644 (file)
@@ -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");
             }
         }
     };