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.
This commit is contained in:
Guus Sliepen 2012-02-26 16:56:53 +01:00
parent 483c5dcfb4
commit a1bd3a2913

View file

@ -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);