From bc59b6e91dd7bd3a683cad9b04398c330eee268a Mon Sep 17 00:00:00 2001 From: loki Date: Mon, 20 Jan 2020 20:52:09 +0100 Subject: [PATCH] Time between stopping and starting as session reduced from two seconds to a mere moment --- sunshine/stream.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sunshine/stream.cpp b/sunshine/stream.cpp index 5e36e1eb..1085f416 100644 --- a/sunshine/stream.cpp +++ b/sunshine/stream.cpp @@ -293,6 +293,10 @@ public: break; case ENET_EVENT_TYPE_DISCONNECT: BOOST_LOG(info) << "CLIENT DISCONNECTED"sv; + // No more clients to send video data to ^_^ + if(session_state == state_e::RUNNING) { + stop(session); + } break; case ENET_EVENT_TYPE_NONE: break;