Branch: Tag:


2014-12-04 19:24:09 by Markus Ottensmann <>

Let Protocols.DNS.async_client create a proper clone

If the async_client->do_query() doesn't find a request id to use, it
creates a new async_client instance and starts the query with that client.

However, if somebody created a sub-class of the async_client and uses an
instance of that, then async_client->do_query() doesn't create a clone of
the existing instance, but a new async_client instance. So any request that
is sent to the next_client will not use the methods that are overwritten
by the sub-class.

Fix that by calling this_program() to create a clone instead of calling
async_client() to create a new Protocols.DNS.async_client instance.

1818:    * requests 'in the air'. /Hubbe    */    if(!next_client) -  next_client=async_client(nameservers,domains); +  next_client=this_program(nameservers,domains);       next_client->do_query(domain, cl, type, callback, @args);    }