diff --git a/src/utils/common/netio.c b/src/utils/common/netio.c
index 6684f2279473a6c5f9cf14cd28c649dbd0211a0f..bd7ec1aea151574f2f8b95969869ea6dcf258035 100644
--- a/src/utils/common/netio.c
+++ b/src/utils/common/netio.c
@@ -188,6 +188,7 @@ int net_init(const srv_info_t     *local,
 
 	// Clean network structure.
 	memset(net, 0, sizeof(*net));
+	net->sockfd = -1;
 
 	// Get remote address list.
 	if (get_addr(remote, iptype, socktype, &net->remote_info) != 0) {