From 4b7200ae69a6c1b0c97be50a84c766283b36e672 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 10 Feb 2019 02:16:05 -0800 Subject: [PATCH] Don't display the connection terminated dialog for intended disconnects --- app/streaming/session.cpp | 7 +++++-- moonlight-common-c/moonlight-common-c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/streaming/session.cpp b/app/streaming/session.cpp index 185b8c9f..6ef8a1b6 100644 --- a/app/streaming/session.cpp +++ b/app/streaming/session.cpp @@ -73,8 +73,11 @@ void Session::clStageFailed(int stage, long errorCode) void Session::clConnectionTerminated(long errorCode) { - s_ActiveSession->m_UnexpectedTermination = true; - emit s_ActiveSession->displayLaunchError("Connection terminated"); + // Display the termination dialog if this was not intended + if (errorCode != 0) { + s_ActiveSession->m_UnexpectedTermination = true; + emit s_ActiveSession->displayLaunchError("Connection terminated"); + } SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Connection terminated: %ld", diff --git a/moonlight-common-c/moonlight-common-c b/moonlight-common-c/moonlight-common-c index dc21e28e..eb6bfe02 160000 --- a/moonlight-common-c/moonlight-common-c +++ b/moonlight-common-c/moonlight-common-c @@ -1 +1 @@ -Subproject commit dc21e28e1fa29202977344cea2bd86a3fba755c6 +Subproject commit eb6bfe020538d57ec2781c65f450409f32e56515