Skip to content

Commit 313e3a8

Browse files
authored
Merge pull request #119 from ConductorOne/ggreer/release-connection
Release ldap client connection if error is one we don't care about.
2 parents 8d7c849 + a6caee6 commit 313e3a8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/ldap/client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ func (c *Client) getConnection(ctx context.Context, isModify bool, f func(client
9494
ldap.LDAPResultUnwillingToPerform,
9595
ldap.LDAPResultNoSuchAttribute,
9696
) && isModify {
97+
cp.Release()
9798
return nil
9899
}
99100
l.Error("baton-ldap: client failed to run function", zap.Error(err))

0 commit comments

Comments
 (0)