[PING]
[reactos.git] / reactos / base / applications / network / ping / ping.c
index b9635e2..19aa099 100644 (file)
@@ -555,7 +555,6 @@ static BOOL Ping(VOID)
     }
     if (Status == SOCKET_ERROR)
     {
-        LostCount++;
         if (WSAGetLastError() == WSAEHOSTUNREACH)
             printf("Destination host unreachable.\n");
         else
@@ -630,8 +629,9 @@ int main(int argc, char* argv[])
         while ((NeverStop) || (Count < PingCount))
         {
             Ping();
-            Sleep(Timeout);
             Count++;
+            if((NeverStop) || (Count < PingCount))
+                Sleep(Timeout);
         };
 
         Cleanup();