Fix race condition in manual weekly restart. The call to IBAutomater.Stop() waits for the process to exit, but IB's handler for the process' Exited event is taking the same lock as StartGatewayWeeklyRestartTask which takes that lock before stoping the IB automater, causing a dealock when different a different thread handles the Exited event.
Related Issue
N/A
Motivation and Context
N/A
Requires Documentation Change
N/A
How Has This Been Tested?
Integration with Lean
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] Refactor (non-breaking change which improves implementation)
[ ] Performance (non-breaking change which improves performance. Please add associated performance test and results)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
Fix race condition in manual weekly restart. The call to
IBAutomater.Stop()
waits for the process to exit, but IB's handler for the process'Exited
event is taking the same lock asStartGatewayWeeklyRestartTask
which takes that lock before stoping the IB automater, causing a dealock when different a different thread handles theExited
event.Related Issue
N/A
Motivation and Context
N/A
Requires Documentation Change
N/A
How Has This Been Tested?
Integration with Lean
Types of changes
Checklist:
bug-<issue#>-<description>
orfeature-<issue#>-<description>