~sircmpwn/tokidoki-devel

auth/imap: close IMAP connection earlier v1 APPLIED

Simon Ser: 1
 auth/imap: close IMAP connection earlier

 1 files changed, 1 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/tokidoki-devel/patches/32489/mbox | git am -3
Learn more about email & git

[PATCH] auth/imap: close IMAP connection earlier Export this patch

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
Thanks!