Changeset 242 in code for trunk/downstream.go


Ignore:
Timestamp:
Apr 7, 2020, 12:45:08 PM (5 years ago)
Author:
contact
Message:

Make Ring.NewConsumer seq argument mandatory

There's no point in supporting a nil argument anymore.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r239 r242  
    662662
    663663        dc.forEachNetwork(func(net *network) {
    664                 var seqPtr *uint64
    665                 if sendHistory {
    666                         seq, ok := net.history[dc.clientName]
    667                         if ok {
    668                                 seqPtr = &seq
    669                         }
    670                 }
    671 
    672                 consumer := net.ring.NewConsumer(seqPtr)
     664                seq, ok := net.history[dc.clientName]
     665                if !sendHistory || !ok {
     666                        return
     667                }
     668
     669                consumer := net.ring.NewConsumer(seq)
    673670
    674671                // TODO: this means all history is lost when trying to send it while the
Note: See TracChangeset for help on using the changeset viewer.