From 4af28a5f25c85ed5553c061fd7680a27a5523f04 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 28 Dec 2015 17:07:01 +0100 Subject: that is why I used MSG_PEEK initially MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/satd-diminished.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/satd-diminished.c b/src/satd-diminished.c index d887e27..7ab6478 100644 --- a/src/satd-diminished.c +++ b/src/satd-diminished.c @@ -92,7 +92,7 @@ accept_again: } } fork_again: - if (recv(fd, &type, (size_t)1, 0) <= 0) { + if (recv(fd, &type, (size_t)1, MSG_PEEK /* Just peek in case we fail! */) <= 0) { perror(argv[0]); goto connection_done; } -- cgit v1.2.3-70-g09d2