In the following code, the thread hangs for 10 secs the first time packet.getSocketAddress() is called:
//Find the participant in the database based on SSRC
Participant part = rtpSession.partDb.getParticipant(pktSsrc);
if(part == null) {
InetSocketAddress nullSocket = null;
part = new Participant((InetSocketAddress) packet.getSocketAddress(), nullSocket, pkt.getSsrc());
part.unexpected = true;
rtpSession.partDb.addParticipant(1,part);
}
Thread no longer hangs when I create a new InetSocketAddress instead:
//Find the participant in the database based on SSRC
Participant part = rtpSession.partDb.getParticipant(pktSsrc);
if(part == null) {
InetSocketAddress nullSocket = null;
InetSocketAddress rtpSocket = new InetSocketAddress(packet.getAddress().getHostAddress(), packet.getPort());
part = new Participant(rtpSocket, nullSocket, pkt.getSsrc());
part.unexpected = true;
rtpSession.partDb.addParticipant(1,part);
}
This has to do with Microsoft trying to resolve the hostname to an IP address. Check the status of your DNS setup on your machine or add the name into the etc/drivers/hosts.txt file.