diff --git a/plugins/sync/src/main/java/info/nightscout/plugins/sync/nsclientV3/NSClientV3Plugin.kt b/plugins/sync/src/main/java/info/nightscout/plugins/sync/nsclientV3/NSClientV3Plugin.kt index 311fa80b06..4c3a406753 100644 --- a/plugins/sync/src/main/java/info/nightscout/plugins/sync/nsclientV3/NSClientV3Plugin.kt +++ b/plugins/sync/src/main/java/info/nightscout/plugins/sync/nsclientV3/NSClientV3Plugin.kt @@ -401,7 +401,7 @@ class NSClientV3Plugin @Inject constructor( it.put("accessToken", sp.getString(R.string.key_ns_client_token, "")) } rxBus.send(EventNSClientNewLog("► WS", "requesting auth for alarms")) - socket?.emit("subscribe", authMessage, Ack { args -> + socket.emit("subscribe", authMessage, Ack { args -> val response = args[0] as JSONObject wsConnected = if (response.optBoolean("success")) { rxBus.send(EventNSClientNewLog("◄ WS", response.optString("message")))