MHD_upgraded_send(): do not retry with sending if timeout is precisely expired

This commit is contained in:
Evgeny Grin (Karlson2k)
2024-09-29 17:57:39 +02:00
parent be42d08edf
commit 2cbfbae808
+2 -1
View File
@@ -392,7 +392,8 @@ MHD_upgraded_send (struct MHD_UpgradeHandle *MHD_RESTRICT urh,
else
{
wait_left = finish_time - cur_time;
if (wait_left > cur_time - finish_time)
if ((wait_left > cur_time - finish_time) ||
(0 == wait_left))
return MHD_SC_UPGRADED_NET_TIMEOUT;
}
}