| 1597 | } |
| 1598 | |
| 1599 | void SAMBridge::HandleSessionCleanupTimer (const boost::system::error_code& ecode, |
| 1600 | std::shared_ptr<SAMSession> session, std::shared_ptr<boost::asio::steady_timer> timer) |
| 1601 | { |
| 1602 | if (ecode != boost::asio::error::operation_aborted && session) |
| 1603 | { |
| 1604 | auto dest = session->GetLocalDestination (); |
| 1605 | if (dest) |
| 1606 | { |
| 1607 | auto streamingDest = dest->GetStreamingDestination (); |
| 1608 | if (streamingDest) |
| 1609 | { |
| 1610 | auto numStreams = streamingDest->GetNumStreams (); |
| 1611 | if (numStreams > 0) |
| 1612 | { |
| 1613 | LogPrint (eLogInfo, "SAM: Session ", session->Name, " still has ", numStreams, " streams"); |
| 1614 | ScheduleSessionCleanupTimer (session); |
| 1615 | } |
| 1616 | else |
| 1617 | LogPrint (eLogDebug, "SAM: Session ", session->Name, " terminated"); |
| 1618 | } |
| 1619 | } |
| 1620 | } |
| 1621 | // session's destructor is called here unless rescheduled |
| 1622 | } |
| 1623 | |
| 1624 | std::shared_ptr<SAMSession> SAMBridge::FindSession (std::string_view id) const |
| 1625 | { |
nothing calls this directly
no test coverage detected