MEDIUM: connection: provide a common conn_full_close() function
Several places got the connection close sequence wrong because it
was not obvious. In practice we always need the same sequence when
aborting, so let's have a common function for this.
diff --git a/src/session.c b/src/session.c
index 9827eb8..0a07056 100644
--- a/src/session.c
+++ b/src/session.c
@@ -249,7 +249,7 @@
static void kill_mini_session(struct session *s)
{
/* kill the connection now */
- conn_xprt_close(s->si[0].conn);
+ conn_full_close(s->si[0].conn);
s->fe->feconn--;
if (s->stkctr1_entry || s->stkctr2_entry)
@@ -273,11 +273,6 @@
task_delete(s->task);
task_free(s->task);
- if (fdtab[s->si[0].conn->t.sock.fd].owner)
- fd_delete(s->si[0].conn->t.sock.fd);
- else
- close(s->si[0].conn->t.sock.fd);
-
pool_free2(pool2_connection, s->si[1].conn);
pool_free2(pool2_connection, s->si[0].conn);
pool_free2(pool2_session, s);