kernel-netlink: Directly handle Netlink messages if thread pool is empty

During initialization of the plugins the thread pool is not yet
initialized so there is no watcher thread that could handle the queued
Netlink message and the main thread will wait indefinitely for a
response.

Fixes #2199.
This commit is contained in:
Tobias Brunner
2017-05-23 16:49:39 +02:00
parent 9b29003cd9
commit 7caec9e4a4
@@ -333,7 +333,8 @@ static status_t send_once(private_netlink_socket_t *this, struct nlmsghdr *in,
while (!entry->complete)
{
if (this->parallel &&
lib->watcher->get_state(lib->watcher) != WATCHER_STOPPED)
lib->watcher->get_state(lib->watcher) != WATCHER_STOPPED &&
lib->processor->get_total_threads(lib->processor))
{
if (this->timeout)
{