summaryrefslogtreecommitdiff
path: root/sockets.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2020-01-05 21:14:14 +0000
committerLuke Bratch <luke@bratch.co.uk>2020-01-05 21:14:14 +0000
commitd0c2d49cc63cf14a094f3bb168ffdd18e2ea5ff3 (patch)
treece5df97dd233c6c9af84e3ac79bcb6ce8436c782 /sockets.c
parent4fd155cc619a08011b9ff3fe80238eb5724d3823 (diff)
Have openssl_accept return 0 if fd_toggle_blocking failed.
Diffstat (limited to 'sockets.c')
-rw-r--r--sockets.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sockets.c b/sockets.c
index 2ed993e..f201d79 100644
--- a/sockets.c
+++ b/sockets.c
@@ -301,6 +301,7 @@ int openssl_accept(int fd, struct client *clients, struct ircdstate *ircdstate,
if (!fd_toggle_blocking(clients[clientindex].fd, 1)) {
debugprint(DEBUG_CRIT, "fd_toggle_blocking off failed for fd %d: %s.\n", clients[clientindex].fd, strerror(errno));
disconnectclient(clients[clientindex].fd, clients, ircdstate, settings, clientcodes);
+ return 0;
}
// And mark as no longer pending SSL_accept()
clients[clientindex].pendingsslaccept = 0;