Commit ea8e55dbabd9c6840a4d8e4d09a8d285b2e0bae5
1 parent
04657813
Set downlink msg id in the response msg
Showing
1 changed file
with
6 additions
and
2 deletions
... | ... | @@ -136,7 +136,9 @@ public class EdgeImitator { |
136 | 136 | @Override |
137 | 137 | public void onSuccess(@Nullable List<Void> result) { |
138 | 138 | if (connected) { |
139 | - DownlinkResponseMsg downlinkResponseMsg = DownlinkResponseMsg.newBuilder().setSuccess(true).build(); | |
139 | + DownlinkResponseMsg downlinkResponseMsg = DownlinkResponseMsg.newBuilder() | |
140 | + .setDownlinkMsgId(downlinkMsg.getDownlinkMsgId()) | |
141 | + .setSuccess(true).build(); | |
140 | 142 | edgeRpcClient.sendDownlinkResponseMsg(downlinkResponseMsg); |
141 | 143 | } |
142 | 144 | } |
... | ... | @@ -144,7 +146,9 @@ public class EdgeImitator { |
144 | 146 | @Override |
145 | 147 | public void onFailure(Throwable t) { |
146 | 148 | if (connected) { |
147 | - DownlinkResponseMsg downlinkResponseMsg = DownlinkResponseMsg.newBuilder().setSuccess(false).setErrorMsg(t.getMessage()).build(); | |
149 | + DownlinkResponseMsg downlinkResponseMsg = DownlinkResponseMsg.newBuilder() | |
150 | + .setDownlinkMsgId(downlinkMsg.getDownlinkMsgId()) | |
151 | + .setSuccess(false).setErrorMsg(t.getMessage()).build(); | |
148 | 152 | edgeRpcClient.sendDownlinkResponseMsg(downlinkResponseMsg); |
149 | 153 | } |
150 | 154 | } | ... | ... |