]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Reinstate end of conversation detection.
authorMike Brady <mikebrady@eircom.net>
Sat, 7 May 2016 15:30:11 +0000 (16:30 +0100)
committerMike Brady <mikebrady@eircom.net>
Sat, 7 May 2016 15:30:11 +0000 (16:30 +0100)
rtsp.c

diff --git a/rtsp.c b/rtsp.c
index c41f75400eef7d105b7f814b7a4ea5999b839301..a6e4992a6d3a5970a23dd8d8d4d72c0f78632c95 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
@@ -498,13 +498,14 @@ rtsp_read_request(rtsp_conn_info *conn, rtsp_message **the_packet) {
       goto shutdown;
     }
     nread = read(conn->fd, buf + inbuf, buflen - inbuf);
-    /*
-    if (!nread) {
+    
+    if (nread==0) {
+      // a blocking read that returns zero means eof -- implies connection closed
       debug(2, "RTSP connection closed.");
       reply = rtsp_read_request_response_shutdown_requested;
       goto shutdown;
     }
-    */
+
     if (nread < 0) {
       if (errno == EINTR)
         continue;