host-resolver: Disable resolver thread cancellation by default
authorMartin Willi <martin@revosec.ch>
Tue, 24 Feb 2015 14:59:35 +0000 (15:59 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 24 Feb 2015 14:59:35 +0000 (15:59 +0100)
The default of new threads is cancellable, but the host-resolver thread code
clearly expects the opposite.

src/libstrongswan/networking/host_resolver.c

index a7524ac..cb8b48b 100644 (file)
@@ -163,6 +163,9 @@ static void *resolve_hosts(private_host_resolver_t *this)
        int error;
        bool old, timed_out;
 
+       /* default resolver threads to non-cancellable */
+       thread_cancelability(FALSE);
+
        while (TRUE)
        {
                this->mutex->lock(this->mutex);