[ 
https://issues.apache.org/jira/browse/QPID-1137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606910#action_12606910
 ] 

Alan Conway commented on QPID-1137:
-----------------------------------

You should not need to call Connection::close if Connection::open fails. Why 
did you find it necessary to do so?

There has been some recent refactoring in this area recently, can you check the 
latest trunk and if the problem still exists? If so please clarify what is 
going wrong if you don't call Connection::close after a failed Connection::open.

> [C++] It is required to call Connection::close even if it fails to connect to 
> the broker using Connection::open
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-1137
>                 URL: https://issues.apache.org/jira/browse/QPID-1137
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Client
>            Reporter: Danushka Menikkumbura
>
> I found this flaw when I was using Qpid/C++ to implement AMQP transport for 
> Axis2/C. 
> There I wanted to make the Axis2/C AMQP transport receiver such that it 
> checks for the availability of the Qpid broker and waits in a loop until the 
> broker is up.For this I used a class level Connection object. But with that 
> implementation, when the broker comes up after some time, the Connection 
> object still fails to establish the connection and gives the "Connection 
> refused ... " error. [Socket.cpp:158]. As a remedy for this I had to call 
> Connection::close inside the exception handler. 
> I dont think this is acceptable unless there is a really solid reason behind 
> it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to