Lower the rate of UDP pings to 2 per second rather than 10 per second

This commit is contained in:
Cameron Gutman 2014-11-15 00:29:00 -08:00
parent ff5f50e3ec
commit 67c726a141
2 changed files with 4 additions and 4 deletions

View File

@ -221,7 +221,7 @@ public class AudioStream {
DatagramPacket pingPacket = new DatagramPacket(pingPacketData, pingPacketData.length);
pingPacket.setSocketAddress(new InetSocketAddress(host, RTP_PORT));
// Send PING every 100 ms
// Send PING every 500 ms
while (!isInterrupted())
{
try {
@ -232,7 +232,7 @@ public class AudioStream {
}
try {
Thread.sleep(100);
Thread.sleep(500);
} catch (InterruptedException e) {
connListener.connectionTerminated(e);
return;

View File

@ -267,7 +267,7 @@ public class VideoStream {
DatagramPacket pingPacket = new DatagramPacket(pingPacketData, pingPacketData.length);
pingPacket.setSocketAddress(new InetSocketAddress(host, RTP_PORT));
// Send PING every 100 ms
// Send PING every 500 ms
while (!isInterrupted())
{
try {
@ -278,7 +278,7 @@ public class VideoStream {
}
try {
Thread.sleep(100);
Thread.sleep(500);
} catch (InterruptedException e) {
listener.connectionTerminated(e);
return;