Ethernet shield stop responding after some hours

i added this part

loopCount++;

      // if 10000ms has passed since last packet
      if(loopCount > 10000) {
        // close connection
        client.stop();
        Serial.println("\r\nTimeout");
      }

and so far after 2 days , and "abuse" stress test , the controller respond without problems..! thanks!