async void mConnection_OnDisconnected(WebRTCConnection sender) { mConnected = false; mConnection = null; if (!closing) { await this.ContextSwitchToMessagePumpAsync(); // Switch to UI Thread so we can modify the UI Close(); } }