use timeout so we wait at most 2s if we can't resolve hostname via dns