Background thread for pinging nodes