From 95c638274bf4cc9c095cfc46ac3f2d600c915292 Mon Sep 17 00:00:00 2001 From: Daniel Aloni Date: Mon, 10 Jul 2023 17:24:07 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=85=20Don't=20lint=20errcheck=20for=20?= =?UTF-8?q?conn.Close()=20of=20LDAP=20connection.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- clientapi/auth/password.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d63969caf..515c09db8 100644 --- a/.gitignore +++ b/.gitignore @@ -80,7 +80,7 @@ media_store/ # golang workspaces go.work* -__debug_bin +__debug_bin* cmd/dendrite-monolith-server/dendrite-monolith-server build diff --git a/clientapi/auth/password.go b/clientapi/auth/password.go index cc51edcbf..fa708a507 100644 --- a/clientapi/auth/password.go +++ b/clientapi/auth/password.go @@ -230,6 +230,7 @@ func (t *LoginTypePassword) authenticateLdap(username, password string) (bool, * JSON: spec.Unknown("unable to connect to ldap: " + err.Error()), } } + // nolint: errcheck defer conn.Close() if t.Config.Ldap.AdminBindEnabled {