Hi,

On Tue, Dec 15, 2020 at 06:39:50PM +0100, Domagoj Pensa wrote:
> When running various netsh commands before each 1 second sleep is added.
> As more netsh commands are run, especially for Wintun adapters, that can
> add to a noticable delayed connecting time.
> 
> This should be safe. No problems were found in tests and all netsh
> commands executed properly with delay removed. Also, no delays are used
> in a similar code in interactive service and netsh command executions
> are guarded with a semaphore.

This is... interesting.  The offending sleep(1) was added there by
james, 15 years ago, in commit a9c802b2a (imported from SVN)

That commit basically split the "sleep(5) after each try" into
"sleep(1) before and sleep(4) after", so possibly it was needed 
before the very first netsh call...

The change itself is not commented in the commit message, so we 
can only guess

commit a9c802b2a3f77f2b906e22f582681cdec0790c32
Author: James Yonan <ja...@openvpn.net>
Date:   Thu Dec 22 18:09:40 2005 +0000

    --ip-win32 adaptive is now the default.
    --ip-win32 netsh (or --ip-win32 adaptive when in netsh
    mode) can now set DNS/WINS addresses on the TAP-Win32
    adapter.



Lev: do you have a particular opinion on this change?  You do more
testing with wintun...

gert

-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             g...@greenie.muc.de

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to