Skip to content

Commit d1d45fe

Browse files
author
Vladimir Kotal
committed
avoid unnecessary connections to LDAP server
fixes #3383
1 parent c1e5283 commit d1d45fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/src/main/java/opengrok/auth/plugin/ldap/LdapServer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ public boolean isReachable() {
226226
* @return true if it is working
227227
*/
228228
public synchronized boolean isWorking() {
229-
if (!isReachable()) {
230-
return false;
231-
}
232-
233229
if (ctx == null) {
230+
if (!isReachable()) {
231+
return false;
232+
}
233+
234234
ctx = connect();
235235
}
236236
return ctx != null;

0 commit comments

Comments
 (0)