]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Remove 1 second delay before running netsh
authorDomagoj Pensa <domagoj@pensa.hr>
Thu, 24 Dec 2020 11:59:10 +0000 (12:59 +0100)
committerGert Doering <gert@greenie.muc.de>
Mon, 18 Jan 2021 19:02:29 +0000 (20:02 +0100)
commite7641f9b53bb6075fe7be7d5e6d16378eabebabd
treecad9475f79823ef6881dbac25929bbf10e609e38
parent490203e6a7594ed946fe3158a694f80be2c18c9c
Remove 1 second delay before running netsh

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.

Instead of removing management_sleep(1), management_sleep(0) is used as
a replacement to allow processing any pending actions on the management
interface without any wait.

Signed-off-by: Domagoj Pensa <domagoj@pensa.hr>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Message-Id: <20201224115910.10129-1-domagoj@pensa.hr>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21405.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit b1a8213ee3fe35a4617608ec7653e4dffea79207)
src/openvpn/tun.c