From cb83bb3a51fa48428150a0ef458be8e48872ba69 Mon Sep 17 00:00:00 2001
From: Philipp Takacs <philipp@bureaucracy.de>
Date: Sat, 21 Mar 2026 14:34:22 +0100
Subject: [PATCH 1/6] send error response on reconnect

---
 table_ldap.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/table_ldap.c b/table_ldap.c
index 60df89f..3fe6ded 100644
--- a/table_ldap.c
+++ b/table_ldap.c
@@ -502,8 +502,13 @@ ldap_open(void)
 {
 	struct aldap_message	*amsg = NULL;
 	int			 oldfd = 0;
+	struct request 		*r;
 
 	if (aldap) {
+		while (dict_poproot(&requests, (void **)&r)) {
+			table_api_error(r->id, r->o, NULL);
+			free(r);
+		}
 		oldfd = aldap->fd;
 		aldap_close(aldap);
 		log_info("info: table-ldap: closed previous connection");
-- 
2.52.0

