summaryrefslogtreecommitdiff
path: root/blabouncer.c
diff options
context:
space:
mode:
Diffstat (limited to 'blabouncer.c')
-rw-r--r--blabouncer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/blabouncer.c b/blabouncer.c
index d6df294..d692d19 100644
--- a/blabouncer.c
+++ b/blabouncer.c
@@ -482,6 +482,9 @@ void dochat(int *serversockfd, int *clientsockfd, struct settings *settings) {
sigaddset(&sigset, SIGTERM);
sigprocmask(SIG_BLOCK, &sigset, &oldset);
+ // Extra signal handling to ignore SIGPIPE so failing send() and/or SSL_write() doesn't terminate blabouncer with SIGPIPE
+ signal(SIGPIPE, SIG_IGN);
+
while (1) {
debugprint(DEBUG_FULL, "top of loop, fdmax %d.\n", fdmax);
FD_ZERO(&rfds); // clear entries from fd set