From 4b5a3335837ba378fea0629a9101d67d205fc14f Mon Sep 17 00:00:00 2001 From: ledgerwatch <akhounov@gmail.com> Date: Wed, 7 Oct 2020 22:53:04 +0100 Subject: [PATCH] Revert the context unbundling change (#1203) --- ethdb/kv_remote.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethdb/kv_remote.go b/ethdb/kv_remote.go index 02cff8ecc1..d7b43223ee 100644 --- a/ethdb/kv_remote.go +++ b/ethdb/kv_remote.go @@ -336,7 +336,7 @@ func (c *remoteCursor) Seek(seek []byte) ([]byte, []byte, error) { var err error if c.stream == nil { var streamCtx context.Context - streamCtx, c.streamCancelFn = context.WithCancel(context.Background()) // We create child context for the stream so we can cancel it to prevent leak + streamCtx, c.streamCancelFn = context.WithCancel(c.ctx) // We create child context for the stream so we can cancel it to prevent leak c.stream, err = c.tx.db.remoteKV.Seek(streamCtx) } @@ -430,7 +430,7 @@ func (c *remoteCursorDupSort) SeekBothRange(key, value []byte) ([]byte, []byte, var err error if c.stream == nil { var streamCtx context.Context - streamCtx, c.streamCancelFn = context.WithCancel(context.Background()) // We create child context for the stream so we can cancel it to prevent leak + streamCtx, c.streamCancelFn = context.WithCancel(c.ctx) // We create child context for the stream so we can cancel it to prevent leak c.stream, err = c.tx.db.remoteKV.Seek(streamCtx) if err != nil { return []byte{}, nil, err -- GitLab