diff options
author | Luke Bratch <luke@bratch.co.uk> | 2020-01-05 21:14:14 +0000 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2020-01-05 21:14:14 +0000 |
commit | d0c2d49cc63cf14a094f3bb168ffdd18e2ea5ff3 (patch) | |
tree | ce5df97dd233c6c9af84e3ac79bcb6ce8436c782 | |
parent | 4fd155cc619a08011b9ff3fe80238eb5724d3823 (diff) |
Have openssl_accept return 0 if fd_toggle_blocking failed.
-rw-r--r-- | sockets.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |