title: TcpClient.Close doesn't close the connection
body: <p>I have an application that uses TcpClient and TcpListener to communicate over the network. However, when I call TcpClient.Close on the client to disconnect it from the server, the server doesn't react at all.</p>
  
  <p>Now, before you post a comment about this question being a duplicate of <a href="https://stackoverflow.com/questions/425235/how-to-properly-and-completely-close-reset-a-tcpclient-connection">this</a> one, and how the solution can be found <a href="http://support.microsoft.com/kb/821625" rel="nofollow noreferrer">here</a>, believe me when I say that I've already found these and tried them. It doesn't help. I've also tried different combinations of <code>TcpClient.Close</code>, <code>TcpClient.GetStream().Close()</code>, and <code>TcpClient.Dispose</code>. Nothing works.</p>
  
  <p>The code is nothing noteworthy, just a Disconnect method in the client that resets all of the variables for reuse, and closes all network resources. The server has a loop that checks if <code>TcpClient.Connected</code> is true or not, and if it's false, it's supposed to jump out of the loop and terminate the thread.</p>
  
  <p>Any ideas?</p>