-
Notifications
You must be signed in to change notification settings - Fork 498
Description
I've been seeing an intermittent problem where the RTP channel times out after 30 seconds with no audio or DTMF being received from the remote party.
I added some log statements in to UdpReceiver::BeginReceiveFrom and determined that m_isClosing is set to true right after the call has established when I see this behaviour.
Looking at the code, the m_isClosing is only set in one place - UdpReceiver::EndReceiveFrom when a SocketException is caught with the error code SocketError.ConnectionReset.
There is some logging further down stating:
This means it's not safe to close if BeginReceive gets an ICMP error since the remote party may not have initialised their socket yet.
The SocketError.ConnectionReset error as far as I understand it is raised when an ICMP "port unreachable" packet is received by the OS. This would kind of match-up with this comment, though the comment is for a different catch {} block.
I've commented out the assignment to m_isClosing to see if it alleviates the issue I'm seeing and will respond back with my findings.