From 0b90bb646c164f33048b97555db5e214a89d4090 Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Mon, 8 Sep 2014 13:26:30 +0100 Subject: [PATCH] Seems as if we do need SO_REUSEADDR stuff after all -- to allow shairport-sync to stop and restart cleanly. --- rtsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtsp.c b/rtsp.c index 5c587a56..5220d6f2 100644 --- a/rtsp.c +++ b/rtsp.c @@ -910,8 +910,8 @@ void rtsp_listen_loop(void) { int fd = socket(p->ai_family, p->ai_socktype, IPPROTO_TCP); int yes = 1; -// if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) == -1) -// perror("setsockopt"); + if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) == -1) + perror("setsockopt"); #ifdef IPV6_V6ONLY // some systems don't support v4 access on v6 sockets, but some do.