From 55dbb698e7c7625c2b9ddbe4732a93a2710eb9b5 Mon Sep 17 00:00:00 2001 From: John Sully Date: Tue, 12 Apr 2022 18:56:11 +0000 Subject: [PATCH] SSL connections are expensive, do not do them overly frequently --- src/networking.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/networking.cpp b/src/networking.cpp index e2d22a55c..9f6c4c185 100644 --- a/src/networking.cpp +++ b/src/networking.cpp @@ -1239,6 +1239,7 @@ void clientAcceptHandler(connection *conn) { } #define MAX_ACCEPTS_PER_CALL 1000 +#define MAX_ACCEPTS_PER_CALL_TLS 1 static void acceptCommonHandler(connection *conn, int flags, char *ip, int iel) { client *c; char conninfo[100]; @@ -1386,7 +1387,7 @@ void acceptTcpHandler(aeEventLoop *el, int fd, void *privdata, int mask) { } void acceptTLSHandler(aeEventLoop *el, int fd, void *privdata, int mask) { - int cport, cfd, max = MAX_ACCEPTS_PER_CALL; + int cport, cfd, max = MAX_ACCEPTS_PER_CALL_TLS; char cip[NET_IP_STR_LEN]; UNUSED(el); UNUSED(mask);