From ac1e7389a083aceb87a8cb6fa81a0687a1334e75 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 13 Jan 2025 12:10:25 +0800 Subject: Close connections on QUIT --- mx_recv.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mx_recv.go') diff --git a/mx_recv.go b/mx_recv.go index 221d8eb..8df6cfa 100644 --- a/mx_recv.go +++ b/mx_recv.go @@ -198,6 +198,10 @@ func (session *mx_recv_session) handle() error { case "QUIT": _, _ = session.buf_conn.WriteString("221 2.0.0 Bye\r\n") _ = session.buf_conn.Flush() + if session.tls_conn != nil { + session.tls_conn.Close() + } + session.net_conn.Close() return nil case "NOOP": _, _ = session.buf_conn.WriteString("250 2.0.0 Ok\r\n") -- cgit v1.2.3