From 4f62aadc934b2331a654202ff22fc928e3279a5a Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 17 Aug 2021 16:19:00 +0000 Subject: [PATCH] Set the right session if detach-on-destroy is off. --- server-fn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server-fn.c b/server-fn.c index 9b2f073b..b29bc15c 100644 --- a/server-fn.c +++ b/server-fn.c @@ -445,7 +445,7 @@ server_destroy_session(struct session *s) TAILQ_FOREACH(c, &clients, entry) { if (c->session != s) continue; - server_client_set_session(c, NULL); + server_client_set_session(c, s_new); if (s_new == NULL) c->flags |= CLIENT_EXIT; }