UDPStreamer: poll data semaphore first, then non-blocking command poll

Reorder Execute() main stage so the background thread waits on dataSem
(sleeping until the RT thread posts) before doing the socket select().
The socket poll is now non-blocking (timeout=0) since command latency
bounded by UDPS_DATA_WAIT_MS is acceptable for CONNECT/DISCONNECT.

Also force-remove old udpstreamer-webui binary in run.sh before rebuild
so stale embedded assets are never served.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Martino Ferrari
2026-05-17 23:51:11 +02:00
parent 82005ec5d3
commit ed5d381d32
2 changed files with 19 additions and 16 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ WEBUI_DIR="${REPO_ROOT}/Client/WebUI"
WEBUI_BIN="${WEBUI_DIR}/udpstreamer-webui"
if [ "${START_WEBUI}" -eq 1 ] && [ ! -x "${WEBUI_BIN}" ]; then
echo "==> Building WebUI..."
(cd "${WEBUI_DIR}" && go build -o udpstreamer-webui ./...)
(cd "${WEBUI_DIR}" && rm udpstreamer-webui && go build -o udpstreamer-webui ./...)
echo "==> WebUI build done."
fi