Am 28.09.20 um 01:32 schrieb Vladislav Grishenko: > For non-blocking TCP/Unix connection, OpenVPN checks was it established in > loop and if not - sleeps or handles management for next one second. Since > the first check is made right after the connection attempt, it will likely > be always unsuccessful, resulting in redundant wait for one or more seconds:
Okay, I looked at the code and you are right. That code is a mess. It basically calls select/pool with a timeout of 0, then actively does select/pool in management for 1s and does this in a loop. That this totally wrong indeed. I think we should be more radical here. Always do a 1s poll/select timeout and do a 0s management sleep/poll. That will also make the code a bit simpler. Arne
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel