Skip to content

Commit

Permalink
Index 0 should be used to check the output's status
Browse files Browse the repository at this point in the history
  • Loading branch information
byeonggiljun committed Aug 24, 2023
1 parent 6140be6 commit b33ce99
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ public String generateNetworkSenderBody(
CoordinationType coordinationType,
MessageReporter messageReporter) {
return """
if (%1$s%2$s[sender_index as number] !== undefined) {
this.util.sendRTITimedMessage(%1$s%2$s[sender_index as number], %3$s, %4$s, %5$s);
if (%1$s%2$s[0] !== undefined) {
this.util.sendRTITimedMessage(%1$s%2$s[0], %3$s, %4$s, %5$s);
}
"""
.formatted(
Expand All @@ -136,7 +136,7 @@ public String generatePortAbsentReactionBody(
return """
// If the output port has not been set for the current logical time,
// send an ABSENT message to the receiving federate
if (%1$s%2$s === undefined) {
if (%1$s%2$s[0] === undefined) {
this.util.sendRTIPortAbsent(%3$d, %4$d, %5$s);
}
"""
Expand Down

0 comments on commit b33ce99

Please sign in to comment.