diff options
| -rw-r--r-- | src/chatServer.cpp | 2 | ||||
| -rw-r--r-- | src/sessionManager.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/chatServer.cpp b/src/chatServer.cpp index 8e9a3ab..8605c75 100644 --- a/src/chatServer.cpp +++ b/src/chatServer.cpp @@ -39,7 +39,7 @@ void CChatServer::start() { initManagers(); // will await while waiting for accept() to return a new client - m_sessionManagerThread = std::jthread(&CSessionManager::run, g_pSessionManager.get()); + m_sessionManagerThread = std::jthread(&CSessionManager::run, g_pSessionManager); m_sessionManagerThread.detach(); while (true) { diff --git a/src/sessionManager.cpp b/src/sessionManager.cpp index 2a833e8..20f6820 100644 --- a/src/sessionManager.cpp +++ b/src/sessionManager.cpp @@ -28,7 +28,7 @@ CSessionManager::~CSessionManager() { std::pair<std::jthread, std::shared_ptr<CSession>> *CSessionManager::newSession() { std::shared_ptr session = std::make_shared<CSession>(); - const auto instance = &m_vSessions.emplace_back(std::jthread(&CSession::run, session.get()), session); + const auto instance = &m_vSessions.emplace_back(std::jthread(&CSession::run, session), session); instance->second->setSelf(instance); return instance; } |
