From 945938de10e84cc7f9d8b420973d2671524a0f03 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 14 Jun 2026 14:29:13 +0200 Subject: [PATCH] rtspd: sync up sleep loop with sws Check for `!got_exit_signal` as part of the `while()` expression, instead of doing it after calling `curlx_wait_ms()`. To simplify and improve consistency with rest of code. Follow-up to 0653fa107f6fb03555d49da86a1fbfc659873f5b Follow-up to 123c92c904b2f258ae69e211aa2663e80cb5429a Closes #22006 --- tests/server/rtspd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/server/rtspd.c b/tests/server/rtspd.c index 84e559f726..ec6c5ffad4 100644 --- a/tests/server/rtspd.c +++ b/tests/server/rtspd.c @@ -968,11 +968,9 @@ static int rtspd_send_doc(curl_socket_t sock, struct rtspd_httprequest *req) if(!strcmp("wait", command)) { logmsg("Told to sleep for %d seconds", num); quarters = num * 4; - while(quarters > 0) { + while((quarters > 0) && !got_exit_signal) { quarters--; res = curlx_wait_ms(250); - if(got_exit_signal) - break; if(res) { /* should not happen */ int sockerr = SOCKERRNO;