From 90b5691183f12d348d2651e026e8438ad278c2be Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Mon, 1 Apr 2013 22:26:55 +0800 Subject: Run the cleanup handler also when we close due to TCP connection being closed --- common-session.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'common-session.c') diff --git a/common-session.c b/common-session.c index ec5c9ed..b514796 100644 --- a/common-session.c +++ b/common-session.c @@ -234,7 +234,7 @@ void session_loop(void(*loophandler)()) { } /* clean up a session on exit */ -void common_session_cleanup() { +void session_cleanup() { TRACE(("enter session_cleanup")) @@ -243,6 +243,10 @@ void common_session_cleanup() { TRACE(("leave session_cleanup: !sessinitdone")) return; } + + if (ses.extra_session_cleanup) { + ses.extra_session_cleanup(); + } m_free(ses.session_id); m_burn(ses.keys, sizeof(struct key_context)); -- cgit v1.2.3