This closes #559

This commit is contained in:
jbertram 2016-06-03 11:19:37 -05:00
commit ac87304b16
2 changed files with 7 additions and 2 deletions

View File

@ -1054,9 +1054,11 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
if (defaultAddress == null) {
defaultAddress = address;
message.setAddress(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;

View File

@ -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;
}
}