mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-25 08:12:54 -05:00
honor -1 timeout (ITS#6388)
This commit is contained in:
parent
272abc5561
commit
a95b8cd488
2 changed files with 6 additions and 2 deletions
|
|
@ -48,7 +48,11 @@ is a NULL pointer, the LDAP_OPT_TIMEOUT value set by
|
|||
is used. With the default setting,
|
||||
the select blocks indefinitely. To
|
||||
effect a poll, the timeout argument should be a non-NULL
|
||||
pointer, pointing to a zero-valued timeval structure. See
|
||||
pointer, pointing to a zero-valued timeval structure.
|
||||
To obtain the behavior of the default setting, bypassing any value set by
|
||||
.BR ldap_set_option (3),
|
||||
set to -1 the \fItv_sec\fP field of the \fItimeout\fP parameter.
|
||||
See
|
||||
.BR select (2)
|
||||
for further details.
|
||||
.LP
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ wait4msg(
|
|||
}
|
||||
#endif /* LDAP_DEBUG */
|
||||
|
||||
if ( timeout != NULL ) {
|
||||
if ( timeout != NULL && timeout->tv_sec != -1 ) {
|
||||
tv0 = *timeout;
|
||||
tv = *timeout;
|
||||
tvp = &tv;
|
||||
|
|
|
|||
Loading…
Reference in a new issue