The condition under which I encountered this was trying to set up a connection 
using "tcp-client" and then querying the management console every 500 
milliseconds for the connection state. This would never proceed beyond 
TCP_CONNECT. If you query less than once per second it works fine.

When connecting with TCP, the code does a non-blocking connect. When you 
connect using UDP, you take a different path which does in fact update the 
expiry timer correctly.

--
Thomas

On Jan 22, 2014, at 9:27 AM, Thomas Veerman <thomas.veer...@wanwire.net> wrote:

> When there are events from the management console with an interval shorter
> than 1 second, the event loop never stops as it keeps resetting event_wait.
> ---
>  src/openvpn/manage.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
> index 22dbe13..42a87c2 100644
> --- a/src/openvpn/manage.c
> +++ b/src/openvpn/manage.c
> @@ -2922,7 +2922,8 @@ management_event_loop_n_seconds (struct management 
> *man, int sec)
>           man_check_for_signals (&signal_received);
>         if (signal_received)
>           return;
> -     } while (expire);
> +          update_time();
> +     } while (expire && expire > now);
>  
>        /* revert state */
>        man->persist.standalone_disabled = standalone_disabled_save;
> -- 
> 1.7.12.4 (Apple Git-37)
> 
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today. 
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk_______________________________________________
> Openvpn-devel mailing list
> Openvpn-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to