From 8d17d5f6c4fd95fddd74f5ccd62043babc223fa0 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 22 May 2019 15:15:54 +0200 Subject: [PATCH] Removed FAIL message when trying ::accept() an already closed Socket::Server. --- lib/socket.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/socket.cpp b/lib/socket.cpp index 1a62cf85..4ab377fe 100644 --- a/lib/socket.cpp +++ b/lib/socket.cpp @@ -1272,7 +1272,9 @@ Socket::Connection Socket::Server::accept(bool nonblock){ // we could do this through accept4 with a flag, but that call is non-standard... if (r < 0){ if ((errno != EWOULDBLOCK) && (errno != EAGAIN) && (errno != EINTR)){ - FAIL_MSG("Error during accept: %s. Closing server socket %d.", strerror(errno), sock); + if (errno != EINVAL){ + FAIL_MSG("Error during accept: %s. Closing server socket %d.", strerror(errno), sock); + } close(); } return Socket::Connection();