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 0653fa107f
Follow-up to 123c92c904

Closes #22006
This commit is contained in:
Viktor Szakats 2026-06-14 14:29:13 +02:00
parent d9ea8cdcfa
commit 945938de10
No known key found for this signature in database

View file

@ -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;