From 49fca49cd95aa2cf227509ec4665491c540eb6ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20D=C3=ADaz?= Date: Wed, 6 Mar 2019 17:42:10 +0100 Subject: [PATCH] Remove debug and send task without pointer because its an interface --- gossip/publisher/publisher.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gossip/publisher/publisher.go b/gossip/publisher/publisher.go index 3e13845ba..5f649cb35 100644 --- a/gossip/publisher/publisher.go +++ b/gossip/publisher/publisher.go @@ -110,14 +110,13 @@ func (p *Publisher) Process(b protocol.BatchSnapshots) { taskCh: p.taskCh, batch: b, } - p.taskCh <- *task + p.taskCh <- task } func (p Publisher) runTaskDispatcher() { for { select { case <-p.executionTicker.C: - log.Debug("Dispatching tasks...") go p.dispatchTasks() case <-p.quitCh: p.executionTicker.Stop() @@ -145,7 +144,7 @@ func (p *Publisher) Shutdown() { func (p Publisher) dispatchTasks() { count := 0 var task Task - defer log.Debugf("%d tasks dispatched", count) + for { select { case task = <-p.taskCh: