Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gammazero committed Dec 13, 2024
1 parent 7104e0a commit cfda17c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mfs/repub.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ func (rp *Republisher) Update(c cid.Cid) {
// duration. The `quick` timer allows publishing sooner if there are no more
// updates available.
//
// In other words, the quick timeout means there are no more values to put into
// the "batch", so do update. The long timeout means there are that the "batch"
// is full, so do update, even though there are still values (no quick timeout
// yet) arriving.
//
// If a publish fails, retry repeatedly every `longer` timeout.
func (rp *Republisher) run(ctx context.Context, timeoutShort, timeoutLong time.Duration, lastPublished cid.Cid) {
defer close(rp.stopped)
Expand Down Expand Up @@ -141,7 +146,7 @@ func (rp *Republisher) run(ctx context.Context, timeoutShort, timeoutLong time.D
break
}

// If mot already waiting to publish something, reset the long
// If not already waiting to publish something, reset the long
// timeout.
if !toPublish.Defined() {
longer.Reset(timeoutLong)
Expand Down

0 comments on commit cfda17c

Please sign in to comment.