Skip to content

Commit

Permalink
[ISSUE #4785] Condition check for source worker (#4786)
Browse files Browse the repository at this point in the history
* condition_check_for_source_eorker

* ci_typo_fix

* import_order_fix
  • Loading branch information
manojks1999 authored Mar 10, 2024
1 parent c700a64 commit 0250a89
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.apache.eventmesh.client.tcp.common.MessageUtils;
import org.apache.eventmesh.client.tcp.conf.EventMeshTCPClientConfig;
import org.apache.eventmesh.common.exception.EventMeshException;
import org.apache.eventmesh.common.protocol.tcp.OPStatus;
import org.apache.eventmesh.common.protocol.tcp.Package;
import org.apache.eventmesh.common.protocol.tcp.UserAgent;
import org.apache.eventmesh.common.utils.JsonUtils;
Expand Down Expand Up @@ -196,7 +197,7 @@ public void startPollAndSend() {
while (retryTimes < MAX_RETRY_TIMES) {
try {
Package sendResult = eventMeshTCPClient.publish(event, 3000);
if (sendResult.getHeader().getCode() == 0) {
if (sendResult.getHeader().getCode() == OPStatus.SUCCESS.getCode()) {
// publish success
// commit record
this.source.commit(connectRecord);
Expand Down

0 comments on commit 0250a89

Please sign in to comment.