Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions dotnet/src/webdriver/BiDi/BiDi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace OpenQA.Selenium.BiDi;
public sealed class BiDi : IBiDi
{
private readonly ConcurrentDictionary<Type, Module> _modules = new();
private bool _disposed;

private Broker Broker { get; set; } = null!;

Expand Down Expand Up @@ -83,6 +84,13 @@ public Task<EndResult> EndAsync(EndOptions? options = null, CancellationToken ca

public async ValueTask DisposeAsync()
{
if (_disposed)
{
return;
}

_disposed = true;

await Broker.DisposeAsync().ConfigureAwait(false);
GC.SuppressFinalize(this);
}
Comment thread
nvborisenko marked this conversation as resolved.
Expand Down
Loading