summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-08-24 12:29:40 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-08-24 12:29:40 +0200
commit4da9f9b5be88a0145fe9b85198f012d925f3efff (patch)
tree062792b8eced136dd76241042a5a86b5e8cd478a /src
parentb200104cf2c61465acecaca111e3ec727fc3b954 (diff)
Default defer to on for SSL listeners
Issue #1112
Diffstat (limited to 'src')
-rw-r--r--src/listensocket.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/listensocket.cpp b/src/listensocket.cpp
index fb9f2a0ef..13aebf75f 100644
--- a/src/listensocket.cpp
+++ b/src/listensocket.cpp
@@ -59,7 +59,8 @@ ListenSocket::ListenSocket(ConfigTag* tag, const irc::sockets::sockaddrs& bind_t
if (rv >= 0)
rv = SocketEngine::Listen(this->fd, ServerInstance->Config->MaxConn);
- int timeout = tag->getInt("defer", 0);
+ // Default defer to on for TLS listeners because in TLS the client always speaks first
+ int timeout = tag->getInt("defer", (tag->getString("ssl").empty() ? 0 : 3));
if (timeout && !rv)
{
#if defined TCP_DEFER_ACCEPT