diff options
Diffstat (limited to 'src/core/hle/kernel/client_port.cpp')
-rw-r--r-- | src/core/hle/kernel/client_port.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/kernel/client_port.cpp b/src/core/hle/kernel/client_port.cpp index 120ce554d..20179e546 100644 --- a/src/core/hle/kernel/client_port.cpp +++ b/src/core/hle/kernel/client_port.cpp @@ -15,6 +15,9 @@ ClientPort::ClientPort() {} ClientPort::~ClientPort() {} ResultVal<SharedPtr<ClientSession>> ClientPort::Connect() { + // Note: Threads do not wait for the server endpoint to call + // AcceptSession before returning from this call. + if (active_sessions >= max_sessions) { return ResultCode(ErrorDescription::MaxConnectionsReached, ErrorModule::OS, ErrorSummary::WouldBlock, @@ -27,7 +30,7 @@ ResultVal<SharedPtr<ClientSession>> ClientPort::Connect() { auto client_session = std::get<SharedPtr<ClientSession>>(sessions); auto server_session = std::get<SharedPtr<ServerSession>>(sessions); - server_port->pending_sessions.push_back(server_session); + server_port->pending_sessions.push_back(std::move(server_session)); // Wake the threads waiting on the ServerPort server_port->WakeupAllWaitingThreads(); |