fixing openwire tests

I removed some valid code while removing dead code.
This commit is contained in:
Clebert Suconic 2015-08-31 08:13:55 -04:00
parent ea3fef4e52
commit cc9cacef14
1 changed files with 11 additions and 6 deletions

View File

@ -575,12 +575,17 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor, S
} }
public void dispatchAsync(Command message) { public void dispatchAsync(Command message) {
if (message.isMessageDispatch()) { if (!stopping.get()) {
MessageDispatch md = (MessageDispatch) message; dispatchSync(message);
TransmitCallback sub = md.getTransmitCallback(); }
protocolManager.postProcessDispatch(md); else {
if (sub != null) { if (message.isMessageDispatch()) {
sub.onFailure(); MessageDispatch md = (MessageDispatch) message;
TransmitCallback sub = md.getTransmitCallback();
protocolManager.postProcessDispatch(md);
if (sub != null) {
sub.onFailure();
}
} }
} }
} }