{"action":"opened","issue":{"url":"https://api.github.com/repos/chkr1011/MQTTnet/issues/194","repository_url":"https://api.github.com/repos/chkr1011/MQTTnet","labels_url":"https://api.github.com/repos/chkr1011/MQTTnet/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/chkr1011/MQTTnet/issues/194/comments","events_url":"https://api.github.com/repos/chkr1011/MQTTnet/issues/194/events","html_url":"https://github.com/chkr1011/MQTTnet/issues/194","id":303594993,"number":194,"title":"How to detect disconnection in ManagedClient","user":{"login":"duncanellison","id":1681591,"avatar_url":"https://avatars1.githubusercontent.com/u/1681591?v=4","gravatar_id":"","url":"https://api.github.com/users/duncanellison","html_url":"https://github.com/duncanellison","followers_url":"https://api.github.com/users/duncanellison/followers","following_url":"https://api.github.com/users/duncanellison/following{/other_user}","gists_url":"https://api.github.com/users/duncanellison/gists{/gist_id}","starred_url":"https://api.github.com/users/duncanellison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duncanellison/subscriptions","organizations_url":"https://api.github.com/users/duncanellison/orgs","repos_url":"https://api.github.com/users/duncanellison/repos","events_url":"https://api.github.com/users/duncanellison/events{/privacy}","received_events_url":"https://api.github.com/users/duncanellison/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-08T19:06:23Z","updated_at":"2018-03-08T19:06:23Z","closed_at":null,"author_association":"NONE","body":"I'm just trying to get to grips with this library since converting over from another and to keep things simpler, I'm using a ManagedClient.\r\n\r\nHowever ... I need to know the status of the connection so that I can display that on the UI.  What's the best strategy to do that when using the _managed_ client?\r\n\r\nKeep polling the .isConnected?  \r\n\r\nI'm not sure if the managed client exposes the disconnected event, can you confirm that as I can't seem to hook into it.  I guess it might be because you have no business setting an event handler for this event when the managed code is doing it for you ????\r\n\r\nI also found that i had to add a Thread.sleep after calling StartAsync and checking .IsConnected.  Is that expected ?\r\n\r\nThanks Duncan "}}
{"actor":{"display_login":"duncanellison"}}