title: When disconnecting from WebSphere MQ with C# client TCP connections are still in CLOSE_WAIT status
body: <p>I am disconnecting from MQQueue and MQQueueManager with the following code:</p>
  
  <pre>
  Queue.Close();
  log.Info( "Queue IsOpen: " + Queue.IsOpen.ToString() );
  Queue = null;
  
  QueueManager.Disconnect();
  QueueManager.Close();
  log.Info( "QM IsOpen: " + QueueManager.IsOpen.ToString() );
  log.Info( "QM IsConnected: " + QueueManager.IsConnected.ToString() );
  QueueManager = null;
  </pre>
  
  <p>And I get the following log entries for this:</p>
  
  <pre>
  Queue IsOpen: false
  QM IsOpen: false
  QM IsConnected: false
  </pre>
  
  <p>But after few hours when I run <b>netstat -n</b> command from command prompt I get a long list of connections to MQ server and the State in those connections is <b>CLOSE_WAIT</b>.</p>
  
  <p>Any ideas why the TCP connections doesn't get fully closed? Are there any way that I could kill those from code? Currently I'll have to restart the client app which cleans up the open connections.</p>
  
  <p>WebSphere MQ version is 6.0.2.6 and the .NET libraries are from MQ 7.</p>