Skip to content

Commit cb9362a

Browse files
authored
remove an empty finally (#6716)
1 parent be59e3a commit cb9362a

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

src/core/Akka/Actor/ActorSystem.cs

+7-14
Original file line numberDiff line numberDiff line change
@@ -399,26 +399,19 @@ private void Dispose(bool disposing)
399399
// runtime from inside the finalizer and you should not reference
400400
// other objects. Only unmanaged resources can be disposed.
401401

402-
try
402+
//Make sure Dispose does not get called more than once, by checking the disposed field
403+
if (!_isDisposed)
403404
{
404-
//Make sure Dispose does not get called more than once, by checking the disposed field
405-
if (!_isDisposed)
405+
if (disposing)
406406
{
407-
if (disposing)
408-
{
409-
Log.Debug("Disposing system");
410-
Terminate().Wait(); // System needs to be disposed before method returns
411-
}
412-
413-
//Clean up unmanaged resources
407+
Log.Debug("Disposing system");
408+
Terminate().Wait(); // System needs to be disposed before method returns
414409
}
415410

416-
_isDisposed = true;
411+
//Clean up unmanaged resources
417412
}
418-
finally
419-
{
420413

421-
}
414+
_isDisposed = true;
422415
}
423416

424417
/// <summary>

0 commit comments

Comments
 (0)