diff options
-rw-r--r-- | sockets.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -223,8 +223,10 @@ int socksend(SSL *fd, char *buf, int bufsize, int tls) { if (tls) { return SSL_write(fd, buf, bufsize); } else { + // Clear errno in case send() errors + errno = 0; // Cast the supposed SSL *fd to a long int if we're not using TLS - return send((long int)fd, buf, bufsize, 0); + return send((long int)fd, buf, bufsize, MSG_NOSIGNAL); // MSG_NOSIGNAL so a bad send() can't SIGPIPE blabouncer } } |