From a1bd3a291379492c8ffecd53792065dc20a28c79 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 26 Feb 2012 16:56:53 +0100 Subject: [PATCH] Don't close control connections when handling a reload command. Because this would terminate the connection while the control message handler was still running, it would lead to a segmentation fault later on. --- src/net.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/net.c b/src/net.c index 336bf9ee..c743d598 100644 --- a/src/net.c +++ b/src/net.c @@ -165,6 +165,9 @@ static void timeout_handler(int fd, short events, void *event) { next = node->next; c = node->data; + if(c->status.control) + continue; + if(c->last_ping_time + pingtimeout <= now) { if(c->status.active) { if(c->status.pinged) { @@ -276,6 +279,9 @@ int reload_configuration(void) { for(node = connection_tree->head; node; node = next) { c = node->data; next = node->next; + + if(c->status.control) + continue; if(c->outgoing) { free(c->outgoing->name); -- 2.20.1