From e9936db039118879f179348c21215c96bbf438cc Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 13 Nov 2024 11:45:53 +0100 Subject: [PATCH] Use while true instead of waiting for a keyboard input to quit The function is even worse than just waiting for a keyboard press. The hard-coded assumption in this lwip_unix_keypressed is that select for fd 1 will only return on a keyboard but sometimes select just returns without a timeout or for other reasons and then lwipovpn will just quit at a random point. --- app/unixaf_app.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/unixaf_app.c b/app/unixaf_app.c index 8e3b008..29d0764 100644 --- a/app/unixaf_app.c +++ b/app/unixaf_app.c @@ -479,7 +479,7 @@ main_loop(void) { #endif /* MAIN LOOP for driver update (and timers if NO_SYS) */ - while (!LWIP_EXAMPLE_APP_ABORT()) { + while (true) { unixafif_poll(netif_default); #if ENABLE_LOOPBACK && !LWIP_NETIF_LOOPBACK_MULTITHREADING