question: why lwm2m_rd_client_stop might block #54478
Replies: 1 comment
-
I think there are no real reason any more. Maybe the loop was introduced while developing, just as an extra safety measure, and once it was working, I did not remove it. I'm proposing to remove it in #56564 as I don't currently see any reason for it. The loop itself does not do any corrective action, so if there was any reason that might cause state machine to not go into IDLE, it would block forever. Many corner cases has been fixed in the state machine since introduction of the loop, so I believe it does not serve any purpose anymore. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
routine lwm2m_rd_client_stop of lwm2m_rd_client.c might block until engine is IDLE. This is in particular bad if deregister is set to true and there are some issues with deregistration e.g. timeout during reregistration. The worst thing that can happen is that you block your work queue, where you call that function from, totally. This is the change:
This blocking call causes some troubles for us as as you can imagine the caller might block for ever/some time. I can not follow the reason why this code was introduced and how to fix this in a way that it solves the origin issue. Can't we introduce a new RD_CLIENT_EVENT_DEREGISTERED for this? There is already RD_CLIENT_EVENT_DEREGISTER_FAILURE so I actually assume that such an event would make sense.
Beta Was this translation helpful? Give feedback.
All reactions