Explorar el Código

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

Evgeny Grin (Karlson2k) hace 1 año
padre
commit
2cbfbae808
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/mhd2/upgrade_net.c

+ 2 - 1
src/mhd2/upgrade_net.c

@@ -392,7 +392,8 @@ MHD_upgraded_send (struct MHD_UpgradeHandle *MHD_RESTRICT urh,
       else
       else
       {
       {
         wait_left = finish_time - cur_time;
         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;
           return MHD_SC_UPGRADED_NET_TIMEOUT;
       }
       }
     }
     }