Ethernet question about stop function

I'm looking at the sample code at http://arduino.cc/en/Reference/ClientConnect. It looks like:

void loop()
{
  if (client.available()) {
    char c = client.read();
    Serial.print(c);
  }

  if (!client.connected()) {
    Serial.println();
    Serial.println("disconnecting.");
    client.stop();
    for(;;)
      ;
  }
}

If the client is not connected why do we have to stop(), which is defined as a disconnect?

Thanks, Jim.

If the client is not connected why do we have to stop(), which is defined as a disconnect?

That's a simplified "definition": stop() also does some other tidying-up of internal variables and state information associated with the connection.

Ran

OK, thanks. On the surface, it did look a bit strange.

Jim.