Change the resend error backoff to one sixteenth of a second -- now can alomst tolerate a 10% failure of packets.

This commit is contained in:
Mike Brady
2018-05-09 20:20:54 +01:00
parent 46fae8feb3
commit 7e7bbaf4da
+4 -4
View File
@@ -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 {