ARTEMIS-474 another fix on JChannelWrapper
This commit is contained in:
parent
a3ae2c4ad2
commit
ec73961f72
|
@ -47,13 +47,18 @@ public class JChannelWrapper {
|
|||
this.manager = manager;
|
||||
|
||||
|
||||
if (channel.getReceiver() != null) {
|
||||
logger.warn("The channel already had a receiver previously!!!!", new Exception("trace"));
|
||||
if (isTrace && channel.getReceiver() != null) {
|
||||
logger.trace(this + "The channel already had a receiver previously!!!! == " + channel.getReceiver(), new Exception("trace"));
|
||||
}
|
||||
|
||||
//we always add this for the first ref count
|
||||
channel.setReceiver(new ReceiverAdapter() {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ReceiverAdapter::" + JChannelWrapper.this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receive(org.jgroups.Message msg) {
|
||||
if (isTrace) {
|
||||
|
@ -85,10 +90,10 @@ public class JChannelWrapper {
|
|||
channel.setReceiver(null);
|
||||
logger.trace(this + "::Closing Channel: " + channelName, new Exception("Trace"));
|
||||
channel.close();
|
||||
}
|
||||
manager.removeChannel(channelName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void removeReceiver(JGroupsReceiver receiver) {
|
||||
if (isTrace) logger.trace(this + "::removeReceiver: " + receiver + " on " + channelName, new Exception("Trace"));
|
||||
|
|
Loading…
Reference in New Issue