-
-
Save kaworu/8471616 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/util.c b/src/util.c | |
index 4a88bb1..8f5fdc1 100644 | |
--- a/src/util.c | |
+++ b/src/util.c | |
@@ -124,6 +124,8 @@ make_inet_socket (gint type, struct addrinfo *addr, gboolean is_server, gboolean | |
r = bind (fd, cur->ai_addr, cur->ai_addrlen); | |
} | |
else { | |
+ /* we will check for EPIPE when sending data */ | |
+ setsockopt (fd, SOL_SOCKET, SO_NOSIGPIPE, (const void *)&on, sizeof (gint)); | |
r = connect (fd, cur->ai_addr, cur->ai_addrlen); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment