title: Why will a TCP Server send a FIN immediately after accepting a connection?
body: <p>From the ethreal packet capture, I see the following behaviour which appears quite strange to me:</p>
  
  <pre><code>Client --&gt; Server  [SYN]
  Server --&gt; Client  [SYN, ACK]
  Client --&gt; Server  [ACK]
  Server --&gt; Client  [FIN, ACK]
  Client --&gt; Server  [ACK]
  Client --&gt; Server  [TCP Segment of a reassembled PDU] (I don't know what this means)
  Server --&gt; Client  [RST]
  </code></pre>
  
  <p>Any ideas as to why this could be happening?</p>
  
  <p>Also, the Server Port is 6000. Could that cause any problem?</p>
  
  <p>My other doubts:</p>
  
  <ol>
  <li>Why is there a FIN, ACK? Shouldn't it be only FIN? What is the meaning of the ACK in that message?</li>
  <li>Shouldn't there be a FIN from Client also? </li>
  </ol>
  
  <p>EDIT: 
  After some more analysis, I found if the number of file descriptors have exceeded the limit then a FIN is sent by the Server. But, in this case it doesn't appear that the file descriptors have exceeded the limit. For what other scenarios can this happen?</p>