summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/UICommon/NetPlayIndex.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Core/UICommon/NetPlayIndex.cpp b/Source/Core/UICommon/NetPlayIndex.cpp
index 36cb103243..9915bb311d 100644
--- a/Source/Core/UICommon/NetPlayIndex.cpp
+++ b/Source/Core/UICommon/NetPlayIndex.cpp
@@ -197,6 +197,11 @@ bool NetPlayIndex::Add(NetPlaySession session)
m_player_count = session.player_count;
m_game = session.game_id;
+ m_session_thread_exit_event.Set();
+ if (m_session_thread.joinable())
+ m_session_thread.join();
+ m_session_thread_exit_event.Reset();
+
m_session_thread = std::thread([this] { NotificationLoop(); });
return true;