// Start the discovery thread
if(pthread_create(&mesh->discovery_thread, NULL, discovery_loop, mesh) != 0) {
logger(mesh, MESHLINK_ERROR, "Could not start discovery thread: %s\n", strerror(errno));
// Start the discovery thread
if(pthread_create(&mesh->discovery_thread, NULL, discovery_loop, mesh) != 0) {
logger(mesh, MESHLINK_ERROR, "Could not start discovery thread: %s\n", strerror(errno));