summaryrefslogtreecommitdiffstats
path: root/daemon/session2.c
diff options
context:
space:
mode:
authorLukáš Ondráček <lukas.ondracek@nic.cz>2024-11-11 19:13:27 +0100
committerLukáš Ondráček <lukas.ondracek@nic.cz>2024-11-20 23:54:03 +0100
commitf492f0b2c00345c0c0ca85ab2ee9f78ba55d5528 (patch)
tree191dbe6b3fe4c73d50a90c6b8e0c0c966ea8d0cd /daemon/session2.c
parentdaemon/session2: add half-closed TCP connection handling (diff)
downloadknot-resolver-f492f0b2c00345c0c0ca85ab2ee9f78ba55d5528.tar.xz
knot-resolver-f492f0b2c00345c0c0ca85ab2ee9f78ba55d5528.zip
daemon/defer: defer stream EOF if data are deferred
Diffstat (limited to 'daemon/session2.c')
-rw-r--r--daemon/session2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/session2.c b/daemon/session2.c
index c372bfb5..6eb91bf4 100644
--- a/daemon/session2.c
+++ b/daemon/session2.c
@@ -603,7 +603,7 @@ static int session2_submit(
{
if (session->closing)
return kr_error(ECANCELED);
- if (session->ref_count >= INT_MAX)
+ if (session->ref_count >= INT_MAX - 1)
return kr_error(ETOOMANYREFS);
if (kr_fails_assert(session->proto < KR_PROTO_COUNT))
return kr_error(EFAULT);