diff options
Diffstat (limited to 'sockets.c')
-rw-r--r-- | sockets.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -277,6 +277,10 @@ int fd_toggle_blocking(int fd, int blocking) { int openssl_accept(int fd, struct client *clients, struct ircdstate *ircdstate, struct settings *settings, struct clientcodes *clientcodes) { // Get the index of the this client fd int clientindex = arrindex(clients, fd); + if (clientindex < 0) { + debugprint(DEBUG_CRIT, "openssl_accept(): error: arrindex() returned '%d', exiting!\n", clientindex); + exit(1); + } // Clear OpenSSL errors before proceeding so we can reliably get errors from SSL_accept ERR_clear_error(); |