Count the clients of each listener

A listener counts its clients, whichever of its services they came to,
old or new: those connected now, raised when a client is spawned, and
those done with, raised as one leaves its service. As the listener
outlives a reload, so do the counts.

The services page of the admin interface shows them for each service as
listenerclients and listenerprocessed; services sharing a socket show
the same counts. The takeover case checks that the count goes on
through three reloads and that no client is left counted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Vladimir DubrovinandClaude Opus 5.5 committed 2026-10-15 14:52:06 +03:00
1 parent d83a48fe18
commit 113c9eaebe
4 files changed
+73 -1

No files matched your search

+2
View File
@@ -404,6 +404,8 @@ int reattach(struct clientparam *param, int auth);
/* reattach() where configurations are reloaded, NULL elsewhere */
extern int (*reattachfunc)(struct clientparam *param, int auth);
int clientauth(struct clientparam *param);
uint64_t *listenerclients(struct srvparam *srv);
uint64_t *listenerprocessed(struct srvparam *srv);
struct passwords * copypwl (struct passwords *pwl);
void freepwl(struct passwords *pw);
int copyfilter(struct filter *, struct srvparam *srv);