diff --git a/lib/client.js b/lib/client.js index c6097ad..2cd150f 100644 --- a/lib/client.js +++ b/lib/client.js @@ -291,16 +291,18 @@ Resolve.prototype._preStart = function() { }; Resolve.prototype._shouldContinue = function() { - debug('resolve should continue', this._server_list.length, this._domain); - return this._server_list.length; + debug('resolve should continue', this._server_list.length, this._search_path.length, this._domain); + return this._server_list.length && this._search_path.length; }; Resolve.prototype._nextQuestion = function() { debug('resolve next question', this._domain); + this._buildQuestion([this._domain, this._search_path.pop()].join('.')); }; Resolve.prototype.start = function() { if (!this._started) { + this._search_path = platform.search_path[0].slice(0); this._preStart(); }