-/* $OpenBSD: server-client.c,v 1.370 2021/02/17 07:18:36 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.371 2021/04/05 14:11:05 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
TAILQ_REMOVE(&clients, c, entry);
log_debug("lost client %p", c);
+ if (c->flags & CLIENT_ATTACHED)
+ notify_client("client-detached", c);
+
if (c->flags & CLIENT_CONTROL)
control_stop(c);
if (c->flags & CLIENT_TERMINAL)
if (EVBUFFER_LENGTH(cf->buffer) != 0)
return;
}
-
- if (c->flags & CLIENT_ATTACHED)
- notify_client("client-detached", c);
c->flags |= CLIENT_EXITED;
switch (c->exit_type) {