From dcd8ee5b5496e2483641f6af6bcd57928625f32e Mon Sep 17 00:00:00 2001 From: Tobias Dittmann Date: Tue, 18 Apr 2023 09:04:38 +0200 Subject: [PATCH] before stash --- conn.go | 1 + server.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/conn.go b/conn.go index 17ec508..a652cfc 100644 --- a/conn.go +++ b/conn.go @@ -137,6 +137,7 @@ func (c *Conn) handle(cmd string, arg string) { c.handleData(arg) case "QUIT": c.writeResponse(221, EnhancedCode{2, 0, 0}, "Bye") + c.Close() case "AUTH": if c.server.AuthDisabled { c.protocolError(500, EnhancedCode{5, 5, 2}, "Syntax error, AUTH command unrecognized") diff --git a/server.go b/server.go index a0ba90b..2da53a8 100644 --- a/server.go +++ b/server.go @@ -138,7 +138,7 @@ func (s *Server) Serve(l net.Listener) error { go func() { err := s.handleConn(newConn(c, s)) if err != nil { - s.Logger.Error(err, "handler error: %s") + s.Logger.Error(err, "error handling connection") } }() }