The purpose of this field is the same as the one in `struct stream`.
Reviewed-by: Volker Dusch <[email protected]>
---
include/haproxy/check-t.h | 1 +
src/check.c | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/include/haproxy/check-t.h b/include/haproxy/check-t.h
index 720d2ff02..cb19a571f 100644
--- a/include/haproxy/check-t.h
+++ b/include/haproxy/check-t.h
@@ -197,6 +197,7 @@ struct check {
const struct mux_proto_list *mux_proto; /* the mux to use for all
outgoing connections (specified by the "proto" keyword) */
struct list check_queue; /* entry in the check queue.
Not empty = in queue. */
int via_socks4; /* check the connection via
socks4 proxy */
+ struct ist unique_id; /* custom unique ID, same as in
struct stream */
};
#endif /* _HAPROXY_CHECKS_T_H */
diff --git a/src/check.c b/src/check.c
index 6a29ebe57..b75a9dd57 100644
--- a/src/check.c
+++ b/src/check.c
@@ -458,6 +458,11 @@ void set_server_check_status(struct check *check, short
status, const char *desc
check->result = CHK_RES_UNKNOWN; /* no result yet */
check->desc[0] = '\0';
check->start = now_ns;
+
+ /* Reset unique_id. */
+ pool_free(pool_head_uniqueid, istptr(check->unique_id));
+ check->unique_id = IST_NULL;
+
return;
}
@@ -1558,6 +1563,8 @@ void free_check(struct check *check)
ha_free(&check->tcpcheck);
}
+ pool_free(pool_head_uniqueid, istptr(check->unique_id));
+ check->unique_id = IST_NULL;
ha_free(&check->pool_conn_name);
ha_free(&check->sni);
ha_free(&check->alpn_str);
--
2.53.0