Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to MQTT client disconnect when OnSleep() called

$
0
0

I have an MQTT instance running, I would like to close it when the app is exited, currently I have this the code below, but i get the errors. How can I pass the MqttClient to the function, and close the connection?

        protected override void OnSleep(var client)
        {
        client.DisconnectAsync();
        }

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>