]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Change the resend error backoff to one sixteenth of a second -- now can alomst tolera...
authorMike Brady <mikebrady@eircom.net>
Wed, 9 May 2018 19:20:54 +0000 (20:20 +0100)
committerMike Brady <mikebrady@eircom.net>
Wed, 9 May 2018 19:20:54 +0000 (20:20 +0100)
rtp.c

diff --git a/rtp.c b/rtp.c
index b0f9e84b5cd495090108517c2de6ae6f16856c0b..4189d1650678c47a8ddc4a55a446c483e7af15b0 100644 (file)
--- a/rtp.c
+++ b/rtp.c
@@ -986,7 +986,7 @@ void rtp_request_resend(seq_t first, uint32_t count, rtsp_conn_info *conn) {
     }
 #endif
     uint64_t time_of_sending_fp = get_absolute_time_in_fp();
-    uint64_t resend_error_backoff_time = (uint64_t)1 << (32 - 1); // half a second
+    uint64_t resend_error_backoff_time = (uint64_t)1 << (32 - 4); // one sixteenth of a second
     if ((conn->rtp_time_of_last_resend_request_error_fp == 0) ||
         ((time_of_sending_fp - conn->rtp_time_of_last_resend_request_error_fp) >
          resend_error_backoff_time)) {
@@ -997,7 +997,7 @@ void rtp_request_resend(seq_t first, uint32_t count, rtsp_conn_info *conn) {
           char em[1024];
           strerror_r(errno, em, sizeof(em));
           debug(1,
-                "Error %d using send-to to an audio socket: \"%s\". Backing off for 0.5 seconds.",
+                "Error %d using send-to to an audio socket: \"%s\". Backing off for 1/16th of a second.",
                 errno, em);
           conn->rtp_time_of_last_resend_request_error_fp = time_of_sending_fp;
         } else {
@@ -1005,8 +1005,8 @@ void rtp_request_resend(seq_t first, uint32_t count, rtsp_conn_info *conn) {
         }
 
       } else {
-        debug(3, "Dropping resend request packet to simulate a bad network. Backing off for 0.5 "
-                 "seconds.");
+        debug(3, "Dropping resend request packet to simulate a bad network. Backing off for 1/16th of a "
+                 "second.");
         conn->rtp_time_of_last_resend_request_error_fp = time_of_sending_fp;
       }
     } else {