Loading src/lib/kinetic_socket.c +13 −13 Original line number Diff line number Diff line Loading @@ -221,19 +221,19 @@ int KineticSocket_Connect(char* host, int port, bool blocking) // On BSD-like systems we can set SO_NOSIGPIPE on the socket to prevent it from sending a // PIPE signal and bringing down the whole application if the server closes the socket // forcibly #if defined(SO_NOSIGPIPE) && !defined(__APPLE__) { int set = 1; int setsockopt_result = setsockopt(socket_fd, SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof(set)); // Allow ENOTSOCK because it allows tests to use pipes instead of real sockets if (setsockopt_result != 0 && setsockopt_result != ENOTSOCK) { LOG("Failed to set SO_NOSIGPIPE on socket"); close(result.fd); continue; } } #endif // #if defined(SO_NOSIGPIPE) && !defined(__APPLE__) // { // int set = 1; // int setsockopt_result = setsockopt(socket_fd, SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof(set)); // // Allow ENOTSOCK because it allows tests to use pipes instead of real sockets // if (setsockopt_result != 0 && setsockopt_result != ENOTSOCK) // { // LOG("Failed to set SO_NOSIGPIPE on socket"); // close(result.fd); // continue; // } // } // #endif break; } Loading Loading
src/lib/kinetic_socket.c +13 −13 Original line number Diff line number Diff line Loading @@ -221,19 +221,19 @@ int KineticSocket_Connect(char* host, int port, bool blocking) // On BSD-like systems we can set SO_NOSIGPIPE on the socket to prevent it from sending a // PIPE signal and bringing down the whole application if the server closes the socket // forcibly #if defined(SO_NOSIGPIPE) && !defined(__APPLE__) { int set = 1; int setsockopt_result = setsockopt(socket_fd, SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof(set)); // Allow ENOTSOCK because it allows tests to use pipes instead of real sockets if (setsockopt_result != 0 && setsockopt_result != ENOTSOCK) { LOG("Failed to set SO_NOSIGPIPE on socket"); close(result.fd); continue; } } #endif // #if defined(SO_NOSIGPIPE) && !defined(__APPLE__) // { // int set = 1; // int setsockopt_result = setsockopt(socket_fd, SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof(set)); // // Allow ENOTSOCK because it allows tests to use pipes instead of real sockets // if (setsockopt_result != 0 && setsockopt_result != ENOTSOCK) // { // LOG("Failed to set SO_NOSIGPIPE on socket"); // close(result.fd); // continue; // } // } // #endif break; } Loading