We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0e6471 commit 6ceb672Copy full SHA for 6ceb672
subsys/net/lib/sockets/socket_obj_core.c
@@ -66,15 +66,15 @@ static void sock_obj_core_init_and_link(struct sock_obj *sock)
66
type_init_done = true;
67
}
68
69
- k_obj_core_init_and_link(K_OBJ_CORE(sock), &sock_obj_type);
70
- k_obj_core_stats_register(K_OBJ_CORE(sock), &sock->stats,
71
- sizeof(struct sock_obj_type_raw_stats));
72
-
73
/* If the socket was closed and we re-opened it again, then clear
74
* the statistics.
75
*/
76
if (sock->init_done) {
77
k_obj_core_stats_reset(K_OBJ_CORE(sock));
+ } else {
+ k_obj_core_init_and_link(K_OBJ_CORE(sock), &sock_obj_type);
+ k_obj_core_stats_register(K_OBJ_CORE(sock), &sock->stats,
+ sizeof(struct sock_obj_type_raw_stats));
78
79
80
sock->init_done = true;
0 commit comments