Skip to content

Commit e4528ad

Browse files
authored
Await handle on disposal (#2699)
1 parent 85aa4b0 commit e4528ad

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/PuppeteerSharp/Cdp/CdpElementHandle.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,17 @@ await handle.Client.SendAsync(
144144
});
145145

146146
/// <inheritdoc />
147-
public override ValueTask DisposeAsync()
147+
public override async ValueTask DisposeAsync()
148148
{
149149
if (Disposed)
150150
{
151-
return default;
151+
return;
152152
}
153153

154154
Disposed = true;
155155

156-
Handle.DisposeAsync();
156+
await Handle.DisposeAsync().ConfigureAwait(false);
157157
GC.SuppressFinalize(this);
158-
return default;
159158
}
160159

161160
/// <inheritdoc />

0 commit comments

Comments
 (0)