Skip to content

Commit b80e8fe

Browse files
committed
Feedback: Trust framework to not to call dispose more than once.
1 parent 012d1bb commit b80e8fe

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/Components/Components/src/OwningComponentBase.cs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,9 @@ protected virtual void Dispose(bool disposing)
7272
/// <inheritdoc />
7373
async ValueTask IAsyncDisposable.DisposeAsync()
7474
{
75-
if (!IsDisposed)
76-
{
77-
try
78-
{
79-
await DisposeAsyncCore().ConfigureAwait(false);
80-
}
81-
finally
82-
{
83-
Dispose(disposing: true);
84-
}
85-
}
75+
await DisposeAsyncCore().ConfigureAwait(false);
76+
77+
Dispose(disposing: true);
8678
GC.SuppressFinalize(this);
8779
}
8880

0 commit comments

Comments
 (0)