From: Mike Brady Date: Sat, 7 May 2016 15:30:11 +0000 (+0100) Subject: Reinstate end of conversation detection. X-Git-Tag: 2.8.3.5~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=429b04f13ca5befdc2b9417c867605a9dfdad4ca;p=thirdparty%2Fshairport-sync.git Reinstate end of conversation detection. --- diff --git a/rtsp.c b/rtsp.c index c41f7540..a6e4992a 100644 --- 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;