connect counter

This commit is contained in:
Milos Kozak 2017-02-21 10:36:29 +01:00
parent 3f84a63213
commit 99b66ab393

View file

@ -79,6 +79,7 @@ public class NSClientService extends Service {
public static boolean isConnected = false; public static boolean isConnected = false;
public static boolean hasWriteAuth = false; public static boolean hasWriteAuth = false;
private static Integer dataCounter = 0; private static Integer dataCounter = 0;
private static Integer connectCounter = 0;
public static String nightscoutVersionName = ""; public static String nightscoutVersionName = "";
@ -222,7 +223,8 @@ public class NSClientService extends Service {
private Emitter.Listener onConnect = new Emitter.Listener() { private Emitter.Listener onConnect = new Emitter.Listener() {
@Override @Override
public void call(Object... args) { public void call(Object... args) {
MainApp.bus().post(new EventNSClientNewLog("NSCLIENT", "connect event. ID: " + mSocket.id())); connectCounter++;
MainApp.bus().post(new EventNSClientNewLog("NSCLIENT", "connect #" + connectCounter + " event. ID: " + mSocket.id()));
sendAuthMessage(new NSAuthAck()); sendAuthMessage(new NSAuthAck());
} }
}; };