We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c0dc6a commit 7fd3404Copy full SHA for 7fd3404
unixfs/io/pbdagreader.go
@@ -110,6 +110,11 @@ func (dr *PBDagReader) precalcNextBuf(ctx context.Context) error {
110
// In this case, the context used to *preload* the node has been canceled.
111
// We need to retry the load with our context and we might as
112
// well preload some extra nodes while we're at it.
113
+ //
114
+ // Note: When using `Read`, this code will never execute as
115
+ // `Read` will use the global context. It only runs if the user
116
+ // explicitly reads with a custom context (e.g., by calling
117
+ // `CtxReadFull`).
118
dr.preload(ctx, dr.linkPosition)
119
nxt, err = dr.promises[dr.linkPosition].Get(ctx)
120
dr.promises[dr.linkPosition] = nil
0 commit comments