[ https://issues.apache.org/jira/browse/PROTON-2540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17542484#comment-17542484 ]
ASF GitHub Bot commented on PROTON-2540: ---------------------------------------- DreamPearl commented on code in PR #370: URL: https://github.com/apache/qpid-proton/pull/370#discussion_r882663780 ########## cpp/src/reconnect_test.cpp: ########## @@ -129,10 +134,13 @@ class server_connection_handler : public proton::messaging_handler { class tester_base: public proton::messaging_handler { void on_connection_open(proton::connection& c) override { + std::string want_url = "amqp://localhost:" + std::to_string(listening_port_); + if (!c.reconnected()) { start_count++; c.open_sender("messages"); } + ASSERT_EQUAL(c.url(), want_url); Review Comment: @astitcher A minor change from our last discussion. CMIIW Later I realized that c.active() will always be true in on_connection_open(), so no need of adding an assertion for an exception here for the case when the connection is not active. Hence, here just checking for the URL. > [cpp] Provide a way to query proton::connection for the url it was created > with > ------------------------------------------------------------------------------- > > Key: PROTON-2540 > URL: https://issues.apache.org/jira/browse/PROTON-2540 > Project: Qpid Proton > Issue Type: New Feature > Components: cpp-binding > Reporter: Rakhi Kumari > Assignee: Rakhi Kumari > Priority: Major > > Provide a way to connection.url() to identify a connection in a trivial > connection handler. -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org