Skip to content

Commit

Permalink
Use while true instead of waiting for a keyboard input to quit
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
schwabe committed Nov 13, 2024
1 parent d24658f commit e9936db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/unixaf_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e9936db

Please sign in to comment.