Commit ea8759ad authored by Orne Brocaar's avatar Orne Brocaar
Browse files

Remove device lock when downlink can't be sent because of gateway lock.

In this case, we have locked the device, but the downlink is aborted
because the gateway is locked. In such case the device lock must be
removed as nothing was actually sent to the device.
parent 3609f4f9
......@@ -1609,7 +1609,11 @@ func getDownlinkGatewayLock(ctx *dataContext) error {
}
if !set {
// the gateway is already locked
// the gateway is already locked, remove the device lock (as nothing was sent
// for this device) and abort.
key := storage.GetRedisKey(deviceDownlinkLockKey, ctx.DeviceSession.DevEUI)
_ = storage.RedisClient().Del(ctx.ctx, key).Err()
return ErrAbort
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment