Skip to content

Commit 8bc29cd

Browse files
committed
parent context
1 parent 66d2102 commit 8bc29cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/coordination/session.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package coordination
33
import (
44
"context"
55
"encoding/binary"
6+
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xcontext"
67
"math"
78
"math/rand"
89
"sync"
@@ -46,7 +47,7 @@ func createSession(
4647
path string,
4748
opts *options.CreateSessionOptions,
4849
) (*session, error) {
49-
sessionCtx, cancel := context.WithCancel(context.Background())
50+
sessionCtx, cancel := xcontext.WithCancel(xcontext.ValueOnly(ctx))
5051
s := session{
5152
options: opts,
5253
client: client,

0 commit comments

Comments
 (0)