| 485 | } |
| 486 | |
| 487 | void SAMSocket::HandleSessionReadinessCheckTimer (const boost::system::error_code& ecode) |
| 488 | { |
| 489 | if (ecode != boost::asio::error::operation_aborted) |
| 490 | { |
| 491 | if (m_Socket.is_open ()) |
| 492 | { |
| 493 | auto session = m_Owner.FindSession(m_ID); |
| 494 | if(session) |
| 495 | { |
| 496 | if (session->GetLocalDestination ()->IsReady ()) |
| 497 | SendSessionCreateReplyOk (); |
| 498 | else |
| 499 | { |
| 500 | m_Timer.expires_after (std::chrono::seconds(SAM_SESSION_READINESS_CHECK_INTERVAL)); |
| 501 | m_Timer.async_wait (std::bind (&SAMSocket::HandleSessionReadinessCheckTimer, |
| 502 | shared_from_this (), std::placeholders::_1)); |
| 503 | } |
| 504 | } |
| 505 | } |
| 506 | else |
| 507 | Terminate ("SAM: session socket closed"); |
| 508 | } |
| 509 | } |
| 510 | |
| 511 | void SAMSocket::SendSessionCreateReplyOk () |
| 512 | { |
nothing calls this directly
no test coverage detected