title: Do I have to close the socket on the server side after client disconnects?
body: <p>So let me simplify the code I'm working on:</p>
  
  <pre><code>int fd = socket(...);
  int client = accept(fd, ...);
  while (true) {
      int bytes_read = recv(client, ...);
      if (bytes_read == 0) {
          break;
      }
  };
  </code></pre>
  
  <p>At this point I already know that the client is disconnected (<code>recv</code> returned 0). But do I still have to call</p>
  
  <pre><code>close(client);
  </code></pre>
  
  <p>?</p>