Skip to content

Commit 3b85dae

Browse files
fix race condition
1 parent 490321c commit 3b85dae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Ydb.Sdk/src/IDriver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ protected async ValueTask<CallOptions> GetCallOptions(GrpcRequestSettings settin
211211

212212
public ILoggerFactory LoggerFactory { get; }
213213
public void RegisterOwner() => _ownerCount++;
214-
public bool IsDisposed => Disposed == 1;
214+
public bool IsDisposed => Volatile.Read(ref Disposed) == 1;
215215

216216
public void Dispose() => DisposeAsync().AsTask().GetAwaiter().GetResult();
217217

0 commit comments

Comments
 (0)