Use condvar in socket resolver