Skip to content

Commit 9789b39

Browse files
prthakrejzheaux
authored andcommitted
close context with null/empty results
Signed-off-by: Prashant <prashant.thakre@gmail.com>
1 parent bd714da commit 9789b39

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/main/java/org/springframework/ldap/core/LdapTemplate.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,6 +1588,7 @@ <T> Stream<T> searchForStream(LdapQuery query, Function<SearchResult, T> mapper)
15881588
return ctx.search(base, encodedFilter, searchControls);
15891589
});
15901590
if (results == null) {
1591+
closeContextAndNamingEnumeration(ctx, null);
15911592
return Stream.empty();
15921593
}
15931594
return StreamSupport

0 commit comments

Comments
 (0)