Skip to content

Commit

Permalink
Await handle on disposal (#2699)
Browse files Browse the repository at this point in the history
  • Loading branch information
kblok authored Jul 18, 2024
1 parent 85aa4b0 commit e4528ad
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/PuppeteerSharp/Cdp/CdpElementHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,17 @@ await handle.Client.SendAsync(
});

/// <inheritdoc />
public override ValueTask DisposeAsync()
public override async ValueTask DisposeAsync()
{
if (Disposed)
{
return default;
return;
}

Disposed = true;

Handle.DisposeAsync();
await Handle.DisposeAsync().ConfigureAwait(false);
GC.SuppressFinalize(this);
return default;
}

/// <inheritdoc />
Expand Down

0 comments on commit e4528ad

Please sign in to comment.