Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

RE: [milter-greylist] thread leak

2014-02-14 by Bruncsak, Attila

> There is still a problem with that approach: correctly handling
> if the LDAP directory is misbehaving: we do not want to open an
> inifinite amount of connexions if they all get stuck.
> 

This pseudo code is just to show the concept how I imagine to implement
the client side time-out:

Worker thread:

If  no ldap_connection_established
then
    get_the_lock
    If no ldap_opener_thread_working
   Then
      Spawn ldap_opener_thread (detach, etc...)
   fi
  Mark ldap_opener_thread_working
   release_the_lock
  Wait for a very short only (client side time-out) and return LDAP error if no connection yet
fi

Ldap opener thread:

open ldap connection
if no ldap_connection_established
then
  sleep for a while (to throttle the connection attempts)
fi
get_the_lock
UnMark ldap_opener_thread_working
release_the_lock
exit

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.