From 041b82e6ce6c7c5af945211c267f179da4bd298d Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 8 Dec 2017 10:19:15 +0100 Subject: Use correct socket for setsockopt SO_NOSIGPIPE --- src/TcpSocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/TcpSocket.cpp b/src/TcpSocket.cpp index 69b6df5..b233c9f 100644 --- a/src/TcpSocket.cpp +++ b/src/TcpSocket.cpp @@ -57,7 +57,7 @@ TcpSocket::TcpSocket(int port, const string& name) : #if defined(HAVE_SO_NOSIGPIPE) int val = 1; - if (setsockopt(sd, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof(val)) + if (setsockopt(m_sock, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof(val)) == SOCKET_ERROR) { throw std::runtime_error("Can't set SO_NOSIGPIPE"); } -- cgit v1.2.3