Resolve "dig +nssearch org crashes when network is unreachable"
In special NS search mode, after the initial lookup, dig starts the followup lookup with discovered NS servers in the queries list. If one of those queries then fail, dig, as usual, tries to start the next query in the list, which results in a crash, because the NS search mode is special in a way that the queries are running in parallel, so the next query is usually already started.
Apply some special logic in recv_done()
function to deal with the
described situation when handling the query result for the NS search
mode. Particularly, print a warning message for the failed query,
and do not try to start the next query in the list. Also, set a non-zero
exit code if all the queries in the followup lookup fail.
Closes #3207 (closed)