A DNS thread should never handle any kind of signal. The main thread is
responsible for handling signals and it does so without any kind of locking.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When a DNS thread is done with its lookup, instead of existing immediately, it
now waits for another DNS lookup to do instead. This avoids the cost of
starting/stopping threads all the time.
To make sure that (for whatever reason) the number of waiting threads doesn't
get too high, threads exit if there are more than two DNS threads idling around
with nothing to do.
Fixes#132.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Drop support for c-ares. Though Csocket still supports it, ZNC's
configure script doesn't enable it anymore.
This should fix big brokenness of c-ares library, which tried to
connect via IPv6 even when IPv6 is disabled on the system.
Also should fix github issue #37