Commit b7baeeb4 authored by Jozef Kralik's avatar Jozef Kralik Committed by Kishen Maloor

Remove observations for disconnected endpoint

Fixes removing observation over TCP connection, when a peer close
the connection.
parent e50047a2
Pipeline #431 passed with stage
in 6 minutes and 29 seconds
......@@ -150,6 +150,10 @@ oc_handle_session(oc_endpoint_t *endpoint, oc_session_state_t state)
oc_tls_remove_peer(endpoint);
}
#endif /* OC_SECURITY */
#ifdef OC_SERVER
/* remove all observations for the endpoint */
coap_remove_observer_by_client(endpoint);
#endif /* OC_SERVER */
}
#ifdef OC_SESSION_EVENTS
handle_session_event_callback(endpoint, state);
......
Markdown is supported
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