Open xiaomi7732 opened 7 months ago
Describe the bug Event pipe session isn't disposed when there's exception.
To Reproduce Steps to reproduce the behavior:
For whatever reason, when there's exception, the event pipe session should be disposed upon stopping.
Expected behavior Dispose being called upon exception.
... try { if (_currentSession != null) { _... if (disposeEventSessionImmediately) { DisposeEventPipeSession(); } } _logger.LogTrace("[{typeName}] Disabled.", _typeName); } catch (Exception ex) { _logger.LogError(ex, "Unexpected exception stopping session."); // !!!!!! Dispose should have been called here !!!!!!! throw; } finally { _singleTraceSessionHandle.Release(); }
The same should be done for start logic.
Describe the bug Event pipe session isn't disposed when there's exception.
To Reproduce Steps to reproduce the behavior:
For whatever reason, when there's exception, the event pipe session should be disposed upon stopping.
Expected behavior Dispose being called upon exception.
The same should be done for start logic.