From 1a33f88ad6ea457c172459eccb39c5f62d1e478a Mon Sep 17 00:00:00 2001 From: Luca Bernstein Date: Mon, 24 Feb 2020 15:25:00 +0100 Subject: [PATCH] Close sockets if input is read. Solves https://github.com/xkonni/raspberry-remote/issues/34 --- daemon.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon.cpp b/daemon.cpp index 5afd036..7c92aa5 100644 --- a/daemon.cpp +++ b/daemon.cpp @@ -299,6 +299,8 @@ int main(int argc, char* argv[]) { error("ERROR writing to socket"); close(newsockfd); } + shutdown(sockfd, SHUT_WR); + shutdown(newsockfd, SHUT_WR); } /**