title: Host not found (authoritative)
body: <p>recently I wrote some app, that create many threads and connect to different servers as client, I used sockets for it, then I realized I can do it with boost library, so I rewrote app to boost part of connections work good and part give this error:</p>
  
  <blockquote>
    <p>Host not found (authoritative)</p>
  </blockquote>
  
  <p>I don't know why it happens, when I used getaddrbyhost it works perfectly but boost resolver give this error...
  what can be wrong, every address is domain. </p>
  
  <p>Here is part of code:</p>
  
  <pre><code>class client
  {
  public:
      client(boost::asio::io_service&amp; io_service,
             const char* server, const char* port, const int i)
          : resolver_(io_service),
            socket_(io_service),
            i_(i)
      {
  
          tcp::resolver::query query(tcp::v4(), boost::lexical_cast&lt; std::string &gt;( server ),  boost::lexical_cast&lt; std::string &gt;( port ), boost::asio::ip::resolver_query_base::numeric_service);
          resolver_.async_resolve(query,
                                  boost::bind(&amp;client::handle_resolve, this,
                                              boost::asio::placeholders::error,
                                              boost::asio::placeholders::iterator));
      }
  
  private:
      void handle_resolve(const boost::system::error_code&amp; err,
                          tcp::resolver::iterator endpoint_iterator)
      {
          if (!err)
          {
              boost::asio::async_connect(socket_, endpoint_iterator,
                                         boost::bind(&amp;client::handle_connect, this,
                                                     boost::asio::placeholders::error));
          }
          else
          {
              //here outputs error 
              std::cout &lt;&lt; __FUNCTION__ &lt;&lt; " Error: " &lt;&lt; err.message() &lt;&lt; "\n";
          }
      }
  </code></pre>
  
  <p><strong>edit</strong>
  totally weird yesterday I got problems with it and today it works... hmm maybe dhcp was busy or something</p>