auth/imap: close IMAP connection earlier

No need to keep it around after Authenticate succeeds while handling
the HTTP request (via next.ServeHTTP).
This commit is contained in:
Simon Ser 2022-05-24 10:34:29 +00:00 committed by Conrad Hoffmann
parent e349c22ef3
commit e443b02acf

View File

@ -57,6 +57,7 @@ func (prov *IMAPProvider) doAuth(next http.Handler,
http.Error(w, "Invalid username or password", http.StatusUnauthorized) http.Error(w, "Invalid username or password", http.StatusUnauthorized)
return return
} }
conn.Close()
authCtx := AuthContext{ authCtx := AuthContext{
AuthMethod: "imap", AuthMethod: "imap",