I am disconnecting from MQQueue and MQQueueManager with the following code:
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;
And I get the following log entries for this:
Queue IsOpen: false QM IsOpen: false QM IsConnected: false
But after few hours when I run netstat -n command from command prompt I get a long list of connections to MQ server and the State in those connections is CLOSE_WAIT.
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.
WebSphere MQ version is 6.0.2.6 and the .NET libraries are from MQ 7.