Skip to content

A free open source IT asset/license management system

Set timeout for LDAP server

snipe126a5671fe2d
diff --git a/app/Models/Ldap.php b/app/Models/Ldap.php
index 812372978a..0a68e15407 100644
--- a/app/Models/Ldap.php
+++ b/app/Models/Ldap.php
@@ -48,6 +48,7 @@ class Ldap extends Model
// Needed for AD
ldap_set_option($connection, LDAP_OPT_REFERRALS, 0);
ldap_set_option($connection, LDAP_OPT_PROTOCOL_VERSION, $ldap_version);
+ ldap_set_option($connection, LDAP_OPT_NETWORK_TIMEOUT, 20);
if ($ldap_use_tls=='1') {
ldap_start_tls($connection);