> 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
exitMessage
RE: [milter-greylist] thread leak
2014-02-14 by Bruncsak, Attila
Attachments
- No local attachments were found for this message.