aboutsummaryrefslogtreecommitdiffstats
path: root/client/go/internal
diff options
context:
space:
mode:
Diffstat (limited to 'client/go/internal')
-rw-r--r--client/go/internal/vespa/document/dispatcher.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/go/internal/vespa/document/dispatcher.go b/client/go/internal/vespa/document/dispatcher.go
index 798a888d677..dc6045ac791 100644
--- a/client/go/internal/vespa/document/dispatcher.go
+++ b/client/go/internal/vespa/document/dispatcher.go
@@ -184,10 +184,11 @@ func (d *Dispatcher) enqueue(op documentOp) error {
if !d.started {
return fmt.Errorf("dispatcher is closed")
}
- group, ok := d.inflight[op.document.Id.String()]
+ key := op.document.Id.String()
+ group, ok := d.inflight[key]
if !ok {
group = &documentGroup{}
- d.inflight[op.document.Id.String()] = group
+ d.inflight[key] = group
}
d.mu.Unlock()
group.add(op, op.attempts > 0)