{"action":"reopened","issue":{"url":"https://api.github.com/repos/chkr1011/MQTTnet/issues/358","repository_url":"https://api.github.com/repos/chkr1011/MQTTnet","labels_url":"https://api.github.com/repos/chkr1011/MQTTnet/issues/358/labels{/name}","comments_url":"https://api.github.com/repos/chkr1011/MQTTnet/issues/358/comments","events_url":"https://api.github.com/repos/chkr1011/MQTTnet/issues/358/events","html_url":"https://github.com/chkr1011/MQTTnet/issues/358","id":339383432,"node_id":"MDU6SXNzdWUzMzkzODM0MzI=","number":358,"title":"MqttClient disconnected event not trigger in 2.8.0 and 2.8.1","user":{"login":"iamoldli","id":7851430,"node_id":"MDQ6VXNlcjc4NTE0MzA=","avatar_url":"https://avatars0.githubusercontent.com/u/7851430?v=4","gravatar_id":"","url":"https://api.github.com/users/iamoldli","html_url":"https://github.com/iamoldli","followers_url":"https://api.github.com/users/iamoldli/followers","following_url":"https://api.github.com/users/iamoldli/following{/other_user}","gists_url":"https://api.github.com/users/iamoldli/gists{/gist_id}","starred_url":"https://api.github.com/users/iamoldli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamoldli/subscriptions","organizations_url":"https://api.github.com/users/iamoldli/orgs","repos_url":"https://api.github.com/users/iamoldli/repos","events_url":"https://api.github.com/users/iamoldli/events{/privacy}","received_events_url":"https://api.github.com/users/iamoldli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-09T10:00:47Z","updated_at":"2018-07-18T10:49:47Z","closed_at":null,"author_association":"NONE","body":"I find the ```WaitForTaskAsync``` method in ```MqttClient.cs```  is always deadlock\r\n\r\n```\r\n private static async Task WaitForTaskAsync(Task task, Task sender)\r\n        {\r\n            if (task == sender || task == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (task.IsCanceled || task.IsCompleted || task.IsFaulted)\r\n            {\r\n                return;\r\n            }\r\n\r\n            try\r\n            {\r\n                **await task.ConfigureAwait(false);**\r\n            }\r\n            catch (OperationCanceledException)\r\n            {\r\n            }\r\n        }\r\n```"}}
{"actor":{"display_login":"iamoldli"}}