BUG/MEDIUM: connection: Just make sure we closed the fd on connection failure.
When the connection failed, we don't really want to close the conn_stream,
as we're probably about to retry, so just make sure the file descriptor is
closed.
diff --git a/src/stream.c b/src/stream.c
index 2e8d755..7c2a63a 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -650,11 +650,10 @@
si->state = SI_ST_CER;
if (srv_cs)
- cs_close(srv_cs);
- else if (conn) {
+ conn = srv_cs->conn;
+ if (conn) {
conn_stop_tracking(conn);
conn_full_close(conn);
- conn_free(conn);
}
if (si->err_type)