astitcher commented on issue #181: PROTON-2040 [cpp] Allow connection options to be updated for reconnect URL: https://github.com/apache/qpid-proton/pull/181#issuecomment-489144925 > It's the pn_connection_t objects that effectively "remember" the options, along with some of the internal C++ context objects. Probably I should add a test to prove this. I don't think this is the case exactly. Looking at the reconnect code (which I just did to remind myself!) I see that we actually now do keep araound a copy of the `connection_options` for a connection in the `connection_context`. This is there because at reconnect time you actually have to get the failover urls and parameters from the connection options as they aren't part of the underlying proton-c model at all. Also looking at the reconnect code I see that at reconnect time it is the *cached away* version of the options that is applied to the new transport of the new connection attempt - I don't think your changes will affect the cached away version of the connection_options - have you tested them? So I'm not convinced your changes even work - unless you've got a test to prove that they do! In summary I think that my suggestion actually is feasible - provide an accessor to the connections options - this would allow you to update them and then they would get used on the next connection attempt.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
