From d0c2d49cc63cf14a094f3bb168ffdd18e2ea5ff3 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sun, 5 Jan 2020 21:14:14 +0000 Subject: Have openssl_accept return 0 if fd_toggle_blocking failed. --- sockets.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sockets.c') 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; -- cgit v1.2.3