On 06/16/2013 08:19 AM, Rajesh Khan wrote:
While attempting to connect to the broker I am getting the following error message2013-06-16 01:15:25 [System] error Connection 127.0.0.1:5672-127.0.0.1:51592No protocol received closing My C++ code looks like this. The error occurs when I attempt to open a connection connection = boost::make_shared <Connection>("127.0.0.1"); connection->open(); //Error Any suggestions why I am getting this error ?
As mentioned in the other thread, you don't need to hold a shared pointer to connections. The connection object is itself actually a shareable handle to the underlying connection.
The error here occurs when a socket is opened but the required AMQP protocol handshaking does not happen within a configured time.
My guess is that it is because you are calling the method this code in concurrently (as described in other thread) and though you are creating three connections, you only retain a pointer to one of them, meaning the others two will get deleted, which prevents further protocol exchange but doesn't close the socket.
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
