mirror of
https://github.com/m5stack/zephyr.git
synced 2026-05-20 10:57:03 -07:00
fa5b706871
Although websocket_recv_msg function accepts timeout parameter, the functionality was rather limited, allowing only to either work in non-blocking manner, or to block indefinitely. Any timeout value other than -1 (forever) ended up in non-blocking operation. This PR fixes this by implementing a basic timeout mechanism, built on top of poll(). For now on, only timeout of 0 will result in non-blocking operation, any other timeout will make the function block for the specified amount of time. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>