Skip to content
Commit 43c988d4 authored by Seppo Takalo's avatar Seppo Takalo Committed by Carles Cufí
Browse files

net: lwm2m: Clean up context on stop



When lwm2m_rd_client_stop() was called and immediately
followed by lwm2m_rd_client_start() it leaked the file
handle for existing socket.

Problem can be fixed when rd_client_stop() does not
move state machine to IDLE, but instead DEREGISTER
and then allow state machine to move forward.

I added a blocking wait for rd_client_stop() because
it needs to wait for proper clean up.

I also move couple of lwm2m_engine_context_close() to
set_sm_state() event handler or similarly in lwm2m_engine.c
there was couple of places where context was not properly
cleaned.

Signed-off-by: default avatarSeppo Takalo <seppo.takalo@nordicsemi.no>
parent f6965ac9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment