From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 31 Oct 2024 17:28:12 +0000 (+0000) Subject: Add a check for when a read() returns zero. X-Git-Tag: 4.3.5^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa3af3b368ffef08db35f4b7ffc15a89a74c35e8;p=thirdparty%2Fshairport-sync.git Add a check for when a read() returns zero. --- diff --git a/rtsp.c b/rtsp.c index 1712e480..e7618995 100644 --- a/rtsp.c +++ b/rtsp.c @@ -1179,9 +1179,13 @@ ssize_t timed_read_from_rtsp_connection(rtsp_conn_info *conn, uint64_t wait_time read_encrypted(conn->fd, &conn->ap2_pairing_context.control_cipher_bundle, buf, count); } else { result = read(conn->fd, buf, count); + if (result == 0) + debug(1, "AP2 read result 0, for a request count of %u.", count); } #else result = read(conn->fd, buf, count); + if (result == 0) + debug(1, "AP1 read result 0, for a request count of %u.", count); #endif if (wait_time != 0) remaining_time = time_to_wait_to - get_absolute_time_in_ns();