Skip to content

Commit

Permalink
Fix echo request identification and support all ISO-8583 versions
Browse files Browse the repository at this point in the history
  • Loading branch information
genuss authored and kpavlov committed Jul 21, 2020
1 parent 7bc17f1 commit 34a9fdb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.kpavlov.jreactive8583.netty.pipeline;

import com.github.kpavlov.jreactive8583.IsoMessageListener;
import com.github.kpavlov.jreactive8583.iso.MessageClass;
import com.github.kpavlov.jreactive8583.iso.MessageFactory;
import com.solab.iso8583.IsoMessage;
import io.netty.channel.ChannelHandlerContext;
Expand All @@ -18,7 +19,7 @@ public EchoMessageListener(final MessageFactory<T> isoMessageFactory) {

@Override
public boolean applies(final IsoMessage isoMessage) {
return isoMessage != null && isoMessage.getType() == 0x800;
return isoMessage != null && (isoMessage.getType() & MessageClass.NETWORK_MANAGEMENT.value()) != 0;
}

/**
Expand Down

0 comments on commit 34a9fdb

Please sign in to comment.