From 39b7fc49bd63161601b93ac5d99d08d789d56ca4 Mon Sep 17 00:00:00 2001 From: Bill Katz Date: Thu, 24 Mar 2022 22:58:43 -0400 Subject: [PATCH] make sure transcode goroutines have correct value --- datatype/labelmap/labelmap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datatype/labelmap/labelmap.go b/datatype/labelmap/labelmap.go index 620c15c8..e1494245 100644 --- a/datatype/labelmap/labelmap.go +++ b/datatype/labelmap/labelmap.go @@ -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(), @@ -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} }