File tree 1 file changed +7
-14
lines changed
1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -399,26 +399,19 @@ private void Dispose(bool disposing)
399
399
// runtime from inside the finalizer and you should not reference
400
400
// other objects. Only unmanaged resources can be disposed.
401
401
402
- try
402
+ //Make sure Dispose does not get called more than once, by checking the disposed field
403
+ if ( ! _isDisposed )
403
404
{
404
- //Make sure Dispose does not get called more than once, by checking the disposed field
405
- if ( ! _isDisposed )
405
+ if ( disposing )
406
406
{
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
414
409
}
415
410
416
- _isDisposed = true ;
411
+ //Clean up unmanaged resources
417
412
}
418
- finally
419
- {
420
413
421
- }
414
+ _isDisposed = true ;
422
415
}
423
416
424
417
/// <summary>
You can’t perform that action at this time.
0 commit comments