Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df4ddebe authored by Andreas Huber's avatar Andreas Huber
Browse files

Fix shutdown and eliminate those annoying "failed to post..." logs.

Change-Id: I963e0712f59070f83a26946c494fdeb3558aa0e3
related-to-bug: 7230886
parent cc0f1cfb
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -1221,8 +1221,11 @@ sp<WifiDisplaySource::PlaybackSession> WifiDisplaySource::findPlaybackSession(
void WifiDisplaySource::disconnectClient(status_t err) {
void WifiDisplaySource::disconnectClient(status_t err) {
    if (mClientSessionID != 0) {
    if (mClientSessionID != 0) {
        if (mClientInfo.mPlaybackSession != NULL) {
        if (mClientInfo.mPlaybackSession != NULL) {
            looper()->unregisterHandler(mClientInfo.mPlaybackSession->id());
            sp<PlaybackSession> playbackSession = mClientInfo.mPlaybackSession;
            mClientInfo.mPlaybackSession.clear();
            mClientInfo.mPlaybackSession.clear();

            playbackSession->destroy();
            looper()->unregisterHandler(playbackSession->id());
        }
        }


        mNetSession->destroySession(mClientSessionID);
        mNetSession->destroySession(mClientSessionID);