[Date Prev][Date Next]
Socket Connection Timeout Patch (ITS#169)
Full_Name: Philipp Klaus
Submission from: (NULL) (22.214.171.124)
OpenLDAP in release 1.2.1 didn't handle timeouts on ldap connections. If a
was opened and not correctly closed by the client (caused by a bad network
p.e) the slapd holds the connection forever and after some time it will run out
file descriptors (for the sockets).
I implemented a simple timeout handling by adding a last activity field to the
connection structure. Each time a read or write access is made to a connection,
field is set to the current time. In each loop this value is checked against
current time and if the difference is greater than the value set in the
file the connection is closed by the server.
All changes are ifdef'ed with _INA_CONN_TIMEOUT to enable compiling without the
The diff is done against the current release (1.2.1) because I couldn't find a
tarball and I am not very used to the CVS system (sorry).
All code is given to the open source community free of any charge.