summaryrefslogtreecommitdiffstats
path: root/PICA_node.c
diff options
context:
space:
mode:
authorAnton <anton@picapica.im>2026-11-25 08:26:49 +0400
committerAnton <anton@picapica.im>2026-11-25 08:26:49 +0400
commit4b1372eae2dba25f92de84a497983961d1d46b70 (patch)
treee0770c0ba1e8d9fc08f263d11617a0a1f3599422 /PICA_node.c
parent48417c1da102dc9eb332227237805b8e28f81f97 (diff)
downloadpica-pica-4b1372eae2dba25f92de84a497983961d1d46b70.tar.gz
pica-pica-4b1372eae2dba25f92de84a497983961d1d46b70.zip
pica-node: fix new connection issue introduced in 6baf0cc
Diffstat (limited to 'PICA_node.c')
-rw-r--r--PICA_node.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/PICA_node.c b/PICA_node.c
index ab7da94..419cb29 100644
--- a/PICA_node.c
+++ b/PICA_node.c
@@ -2132,6 +2132,11 @@ ret:
ncs[*pos].sck = -1;
ncs[*pos].pos = 0;
ncs[*pos].tmst = time(0);
+ //a slot handed over by newconn_free() still carries the type of its
+ //previous connection, which the request handlers would take for a second
+ //request on this one
+ ncs[*pos].type = NEWCONN_UNKNOWN;
+ ncs[*pos].iconn.cl = NULL;
return &ncs[(*pos)++];
}