From 67c726a141b9bb1fc1969cc40a75d1731e9b1a75 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 15 Nov 2014 00:29:00 -0800 Subject: [PATCH] Lower the rate of UDP pings to 2 per second rather than 10 per second --- .../src/com/limelight/nvstream/av/audio/AudioStream.java | 4 ++-- .../src/com/limelight/nvstream/av/video/VideoStream.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/moonlight-common/src/com/limelight/nvstream/av/audio/AudioStream.java b/moonlight-common/src/com/limelight/nvstream/av/audio/AudioStream.java index 67bf9ed6..5ac236b4 100644 --- a/moonlight-common/src/com/limelight/nvstream/av/audio/AudioStream.java +++ b/moonlight-common/src/com/limelight/nvstream/av/audio/AudioStream.java @@ -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; diff --git a/moonlight-common/src/com/limelight/nvstream/av/video/VideoStream.java b/moonlight-common/src/com/limelight/nvstream/av/video/VideoStream.java index d50f1f21..1baf77b4 100644 --- a/moonlight-common/src/com/limelight/nvstream/av/video/VideoStream.java +++ b/moonlight-common/src/com/limelight/nvstream/av/video/VideoStream.java @@ -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;