Threaded DNS

From EggWiki
Jump to navigation Jump to search

In Eggdrop 1.9.2, new code was added to integrate asynchronous DNS into the core code (we decided to call this threaded DNS, because asynchronous is just so hard to type).

Eggdrop's DNS Module History

Because of limitations in early OS design and the desire to make Eggdrop as portable as possible across all the different OSs, the original Eggdrop code required Eggdrop to block when making a DNS request- in other words, when it sent out a DNS query to connect to an IRC server (or other similar operation), it had to wait until it got the reply before conducting any further operation. Usually this was no longer than a few seconds, but those few seconds could be important. Thus, the DNS module was built, to give users the option to use asynchronous DNS requests. Now, Eggdrop could continue doing other operations while the DNS request was being sent.

As additional capabilities were added as baseline features to OSs, it became possible to rip out the old, synchronous DNS request system in the Eggdrop core code and now send asynchronous DNS requests without the need for the DNS module.

Is there any reason to keep using the DNS module?

Generally, you shouldn't need to use the DNS module any longer. A small population may wish to still use the settings associated with the DNS module (the ability to specify a DNS server and associated timeout values). If you wish to still use the DNS module, you must disable threaded DNS

Disabling Threaded DNS

To disable threaded DNS, simply recompile Eggdrop while specifying the configure flag:

 ./configure --disable-tdns

FAQ

I get the following message when I load my Eggdrop:

 Can't load modules dns: Eggdrop was compiled with threaded DNS core; this module will not run with it. Not loading... 

This means that Eggdrop was compiled with the threaded DNS capability (default since 1.9.2), but you are still trying to load the DNS module. Either unload the DNS module from your config file by commenting/deleting:

 loadmodule dns

or disable threaded DNS (we recommend not loading the DNS module).