File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -283,8 +283,11 @@ func getDownlinkFrame(ctx *ackContext) error {
283
283
}
284
284
285
285
// TODO: remove len(Items) != 0 check at next major release
286
- if len (ctx .DownlinkTXAck .Items ) != 0 && len (ctx .DownlinkTXAck .Items ) != len (ctx .DownlinkFrame .DownlinkFrame .Items ) {
287
- return errors .New ("length of ack items is not equal to length of downlink items" )
286
+ // Validate that we don't receive more ack items than downlink items that were
287
+ // sent to the gateway. Receiving less acks is valid, e.g. the gateway might
288
+ // ack the first item only.
289
+ if len (ctx .DownlinkTXAck .Items ) != 0 && len (ctx .DownlinkTXAck .Items ) > len (ctx .DownlinkFrame .DownlinkFrame .Items ) {
290
+ return errors .New ("tx ack contains more items than downlink command" )
288
291
}
289
292
290
293
// for backwards compatibility
You can’t perform that action at this time.
0 commit comments