Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Verified Commit f856d105 authored by Ayush Singh's avatar Ayush Singh
Browse files

Remove Node when cport connection is destroyed


- No point in keeping the node once connection to cport 0 is destroyed.
- Useful when get_manifest or some initial request times out

Signed-off-by: default avatarAyush Singh <ayushdevel1325@gmail.com>
parent 0113ba37
Branches
No related merge requests found
Pipeline #10416 passed with stage
in 1 minute and 24 seconds
......@@ -384,9 +384,11 @@ static void node_intf_destroy_connection(struct gb_interface *ctrl, uint16_t cpo
{
struct node_control_data *ctrl_data = ctrl->ctrl_data;
/* Close socket for cport 0 */
/* Close socket for cport 0, and remove node so that it can be rediscovered */
if (cport_id == 0) {
zsock_close(ctrl_data->sock);
node_cache_remove_by_id(ctrl->id);
node_destroy_interface(ctrl);
}
}
......
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