mirror of
https://github.com/OpenVPN/openvpn.git
synced 2024-09-20 03:52:28 +02:00
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>
This commit is contained in:
parent
8a8ee283aa
commit
b1a8213ee3
@ -5207,7 +5207,7 @@ netsh_command(const struct argv *a, int n, int msglevel)
|
||||
for (i = 0; i < n; ++i)
|
||||
{
|
||||
bool status;
|
||||
management_sleep(1);
|
||||
management_sleep(0);
|
||||
netcmd_semaphore_lock();
|
||||
argv_msg_prefix(M_INFO, a, "NETSH");
|
||||
status = openvpn_execve_check(a, NULL, 0, "ERROR: netsh command failed");
|
||||
|
Loading…
Reference in New Issue
Block a user