diff --git a/rpcs3/Emu/NP/rpcn_client.cpp b/rpcs3/Emu/NP/rpcn_client.cpp index a22e1cb013..96f4fcf856 100644 --- a/rpcs3/Emu/NP/rpcn_client.cpp +++ b/rpcs3/Emu/NP/rpcn_client.cpp @@ -327,7 +327,11 @@ namespace rpcn { duration = 500ms - (now - last_ping_time); } - sem_rpcn.try_acquire_for(duration); + + if (!sem_rpcn.try_acquire_for(duration)) + { + // TODO + } } } } @@ -441,7 +445,7 @@ namespace rpcn return true; } - void rpcn_client::add_packet(const std::vector packet) + void rpcn_client::add_packet(std::vector packet) { std::lock_guard lock(mutex_packets_to_send); packets_to_send.push_back(std::move(packet)); @@ -626,7 +630,7 @@ namespace rpcn { // TODO: add a check for status? - const auto sent_packet = forge_request(command, packet_id, data); + std::vector sent_packet = forge_request(command, packet_id, data); add_packet(std::move(sent_packet)); return true; } diff --git a/rpcs3/Emu/NP/rpcn_client.h b/rpcs3/Emu/NP/rpcn_client.h index 738f173b51..9399ec4b54 100644 --- a/rpcs3/Emu/NP/rpcn_client.h +++ b/rpcs3/Emu/NP/rpcn_client.h @@ -310,7 +310,7 @@ namespace rpcn bool handle_input(); bool handle_output(); - void add_packet(const std::vector packet); + void add_packet(std::vector packet); private: enum class recvn_result