Diffusion GnuPG 0cfdd3b57d59

assuan: Fix exponential decay for first second.

Authored by werner on Nov 15 2017, 3:30 PM.

Description

assuan: Fix exponential decay for first second.

* common/asshelp.c (wait_for_sock): Round SECSLEFT.
* dirmngr/dirmngr.c (main): Take care of --debug-wait also in dameon
mode.
* common/sysutils.c (gnupg_usleep) [HAVE_NANOSLEEP]: Fix nanosleep use.

Without the rounding we saw in verbose mose

[...]to come up ... (5s)
[...]to come up ... (4s)

immediately without the expected one second delay. Waiting for the
next seconds did not work if nanosleep was used due to improper passed
parameters in gnupg_usleep.

Adding --debug-wait for dirmngr in daemon mode is required to test
this change.