ARTEMIS-539 fixing default address on client as well
This commit is contained in:
parent
14516af7c7
commit
17ea05bce6
|
@ -1054,9 +1054,11 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
|||
if (defaultAddress == null) {
|
||||
defaultAddress = address;
|
||||
|
||||
if (message != null) {
|
||||
message.setAddress(address);
|
||||
}
|
||||
else {
|
||||
}
|
||||
else if (message != null) {
|
||||
if (!address.equals(defaultAddress)) {
|
||||
message.setAddress(address);
|
||||
}
|
||||
|
@ -1085,6 +1087,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
|||
|
||||
@Override
|
||||
public synchronized ClientProducerCredits getCredits(final SimpleString address, final boolean anon) {
|
||||
setAddress(null, address);
|
||||
ClientProducerCredits credits = producerCreditManager.getCredits(address, anon, sessionContext);
|
||||
|
||||
return credits;
|
||||
|
|
|
@ -1268,7 +1268,9 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
|
|||
}
|
||||
|
||||
protected void checkDefaultAddress(SimpleString address) {
|
||||
logger.tracef("checkDefaultAddress %s, defaultAddress=%s", address, defaultAddress);
|
||||
if (defaultAddress == null && address != null) {
|
||||
logger.tracef("checkDefaultAddress setting as %s", address);
|
||||
defaultAddress = address;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue