Skip to content

Commit 56a4ace

Browse files
committed
2 parents 624fbe2 + 25073b3 commit 56a4ace

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/projects/base/publisher/stream.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,12 @@ namespace pub
411411
bool Stream::AddSession(std::shared_ptr<Session> session)
412412
{
413413
std::lock_guard<std::shared_mutex> session_lock(_session_map_mutex);
414+
415+
if (_sessions.count(session->GetId()) > 0)
416+
{
417+
logtw("Session ID (%u) already exists, existing session will be overwritten", session->GetId());
418+
}
419+
414420
// For getting session, all sessions
415421
_sessions[session->GetId()] = session;
416422

0 commit comments

Comments
 (0)