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:
parent
e349c22ef3
commit
e443b02acf
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user