Skip to content

Commit

Permalink
make sure transcode goroutines have correct value
Browse files Browse the repository at this point in the history
  • Loading branch information
DocSavage committed Mar 25, 2022
1 parent 663a9ef commit 39b7fc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datatype/labelmap/labelmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -2565,7 +2565,7 @@ func (d *Data) sendBlocksSpecific(ctx *datastore.VersionedCtx, w http.ResponseWr
}

if len(value) > 0 {
go func(bcoord dvid.ChunkPoint3d) {
go func(bcoord dvid.ChunkPoint3d, value []byte) {
b := blockData{
bcoord: bcoord,
v: ctx.VersionID(),
Expand All @@ -2577,7 +2577,7 @@ func (d *Data) sendBlocksSpecific(ctx *datastore.VersionedCtx, w http.ResponseWr
out, err := d.transcodeBlock(b)
timing.transcodeDone(t0)
ch <- blockSend{bcoord: bcoord, value: out, err: err}
}(bcoord)
}(bcoord, value)
} else {
ch <- blockSend{value: nil}
}
Expand Down

0 comments on commit 39b7fc4

Please sign in to comment.