private async void cmdDisconnect_Click(object sender, EventArgs e) { try { await mClient.DisconnectAsync(); } catch (Exception ex) { if (!IsDisposed) { MessageBox.Show(this, $"Disconnect error\n{ex}"); } } }