No need to keep it around after Authenticate succeeds while handling
the HTTP request (via next.ServeHTTP).
---
auth/imap.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/auth/imap.go b/auth/imap.go
index 268cedfa63f2..ca1bd0ceba78 100644
--- a/auth/imap.go
+++ b/auth/imap.go
@@ -57,6 +57,7 @@ func (prov *IMAPProvider) doAuth(next http.Handler,
http.Error(w, "Invalid username or password", http.StatusUnauthorized)
return
}
+ conn.Close()
authCtx := AuthContext{
AuthMethod: "imap",
--
2.36.1