clebertsuconic commented on code in PR #4574:
URL: https://github.com/apache/activemq-artemis/pull/4574#discussion_r1291595969
##########
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java:
##########
@@ -233,6 +235,9 @@ void saveConnectionInfo(String brokerURL, String user,
String password) {
if (Shell.inShell() && CONNECTION_INFORMATION.get() == null) {
CONNECTION_INFORMATION.set(new ConnectionInformation(brokerURL, user,
password));
System.out.println("CLI connected to broker " + brokerURL + ", user:"
+ user);
+ this.brokerURL = brokerURL;
+ this.user = user;
+ this.password = password;
Review Comment:
There was a scenario where recoverConnect was called. the tryConnect was
called, a failure happened, the user / password/ URI was asked, and then
StatQueue didn't have the proper user.
It's either that, or calling recover at the end (which would be worst).
##########
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java:
##########
@@ -233,6 +235,9 @@ void saveConnectionInfo(String brokerURL, String user,
String password) {
if (Shell.inShell() && CONNECTION_INFORMATION.get() == null) {
CONNECTION_INFORMATION.set(new ConnectionInformation(brokerURL, user,
password));
System.out.println("CLI connected to broker " + brokerURL + ", user:"
+ user);
+ this.brokerURL = brokerURL;
+ this.user = user;
+ this.password = password;
Review Comment:
There was a scenario where recoverConnect was called. the tryConnect was
called, a failure happened, the user / password/ URI was asked, and then
StatQueue didn't have the proper user.
It's either that, or calling recover at the end (which would be worse).
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]