IPCConnectedFactoryExchange / CFX

Apache License 2.0
72 stars 67 forks source link

TestChannel() Fails when trying the test a secure connection. #196

Open JWB4AZ opened 7 months ago

JWB4AZ commented 7 months ago

TestChannel() fails unexpectedly when testing a secure connection. I'm using QPID 9.1.0 with jdk-14.0.2. QPID has been edited to handle the secure connection. The Uri example format is as follows: "amqps://user:pw@cfx.aiscorp.com:5671" The return exception has a generic HRESULT == COR_E_EXCEPTION and the InnerException.HResult == COR_E_IO. If I ignore this failure and go on to open the endpoint, it open successfully and after a call to AddPublishChannel(), TestPublishChannel() is successful. The problem occurs when QPID is not running. In this case, again TestChannel() fails as expected. The return exception has a generic HRESULT == COR_E_EXCEPTION and the InnerException.HResult == E_FAIL. Now if I ignore the failure, the endpoint opens successfully and after a call to AddPublishChannel(), TestPublishChannel() now fails. The endpoint is disposed, but there is a memory leak. The memory leak results in growing heap usage that will in the end crash my program. If TestChannel() did not fail with a secure connection, I could avoid the memory leak by not trying to open an endpoint and publish a channel when QPID is not running.