kernel: Fix reference management for client/server session.

- Fixes shutdown crash and crash in Pokemon SwSh.
This commit is contained in:
bunnei 2019-11-25 18:17:08 -05:00
parent 6d23b045a0
commit f6b9b7910e
3 changed files with 18 additions and 20 deletions

View file

@ -20,8 +20,8 @@ class ServerSession;
*/
class Session final {
public:
ClientSession* client = nullptr; ///< The client endpoint of the session.
ServerSession* server = nullptr; ///< The server endpoint of the session.
std::weak_ptr<ClientSession> client; ///< The client endpoint of the session.
std::weak_ptr<ServerSession> server; ///< The server endpoint of the session.
std::shared_ptr<ClientPort> port; ///< The port that this session is associated with (optional).
};
} // namespace Kernel