title: Ethernet shield with arduino gets stuck
body: <p>I have a problem with the Ethernet shield.</p>
  
  <p>This is the sketch I have wrote</p>
  
  <pre><code>void loop() {
    wdt_reset ();
  
    EthernetClient client = server.available();
    if (client) {
      wdt_reset();
      if (client.available() &gt; 0) {
        char thisChar = client.read();
        Serial.write(thisChar);
        RXtext += thisChar;
        // --------------------- this one repeat for few other strings ----
        if (RXtext.indexOf("L1_On") &gt;= 0) {
          // do stuff
          RXtext = GetStat();  // get system status and replay
          server.print(RXtext);
          Serial.println(RXtext);
          RXtext = "";
  
          wdt_reset();
        }
        // ---------- end of repeat -------
      }
    }
  }
  </code></pre>
  
  <p>For some reason the arduino gets stuck after few times I connect to it
  it does not reset the wtd and it gets reset and the it looses the IP and gets <code>255.255.255.255</code> IP. </p>
  
  <p>Can someone tell me what is the problem?</p>