Skip to content

Commit

Permalink
Remove debug and send task without pointer because its an interface
Browse files Browse the repository at this point in the history
  • Loading branch information
gdiazlo committed Mar 6, 2019
1 parent 0caf105 commit 49fca49
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gossip/publisher/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 49fca49

Please sign in to comment.