From: Mike Brady Date: Wed, 9 May 2018 19:20:54 +0000 (+0100) Subject: Change the resend error backoff to one sixteenth of a second -- now can alomst tolera... X-Git-Tag: 3.2RC8~2^2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e7bbaf4dac383d95db8ccfb4e1848e350262700;p=thirdparty%2Fshairport-sync.git Change the resend error backoff to one sixteenth of a second -- now can alomst tolerate a 10% failure of packets. --- diff --git a/rtp.c b/rtp.c index b0f9e84b..4189d165 100644 --- 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 {