diff --git a/src/peers.c b/src/peers.c index d39898a57..59f934d78 100644 --- a/src/peers.c +++ b/src/peers.c @@ -1204,6 +1204,15 @@ static struct task *process_peer_sync(struct task * task) task->expire = TICK_ETERNITY; + if (!st->sessions->peer->peers->peers_fe) { + /* this one was never started, kill it */ + signal_unregister_handler(st->sighandler); + st->table->sync_task = NULL; + task_delete(st->sync_task); + task_free(st->sync_task); + return NULL; + } + if (!stopping) { /* Normal case (not soft stop)*/ if (((st->flags & SHTABLE_RESYNC_STATEMASK) == SHTABLE_RESYNC_FROMLOCAL) &&