Skip to content

Commit a6caee6

Browse files
committed
Release ldap client connection if error is one we don't care about.
1 parent 8d7c849 commit a6caee6

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)