diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.cpp b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.cpp index e08ce43308..f6ae0158a1 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.cpp @@ -74,6 +74,12 @@ public: while (thread_ctrl::state() != thread_state::aborting) { std::unique_lock lock(data_mutex); + + if (thread_ctrl::state() == thread_state::aborting) + { + break; + } + if (msgs.size()) wakey.wait_until(lock, msgs.begin()->first); else @@ -150,6 +156,8 @@ public: tcp_timeout_monitor& operator=(thread_state) { + data_mutex.lock(); + data_mutex.unlock(); wakey.notify_one(); return *this; }