Give network threads the time to terminate