Hello,
Currently, when running the console via Docker, the OnStop() method is not triggered when the process receives a termination signal (like container stop or Ctrl+C).
Technical Details:
- Current behavior: Sending a
SIGTERM results in Exit Code 143 (128+15), meaning the process is killed abruptly by the kernel.
- Expected behavior: The console should catch POSIX signals, trigger the
OnStop() event within the cBot, and finally exit with Code 0.
- Environment/complexity: Since .NET 6 on Linux fully supports POSIX signal handling, I believe this will be a "low-hanging fruit" implementation.
Impact:
This lack of a graceful shutdown makes the current console unsuitable for production environments where closing positions, logging final states, etc., is critical at the time a cBot is stopped.
In short, OnStop() is an essential feature for users to have control over the bot's lifecycle in containerized environments. Moreover, implementing this would ensure feature parity with the Desktop/GUI version's "Stop" button.
Could you please fix this?
I look forward to hearing from you!!
Thanks in advance!
Hello,
Currently, when running the console via Docker, the
OnStop()method is not triggered when the process receives a termination signal (like container stop or Ctrl+C).Technical Details:
SIGTERMresults inExit Code 143(128+15), meaning the process is killed abruptly by the kernel.OnStop()event within the cBot, and finally exit withCode 0.Impact:
This lack of a graceful shutdown makes the current console unsuitable for production environments where closing positions, logging final states, etc., is critical at the time a cBot is stopped.
In short,
OnStop()is an essential feature for users to have control over the bot's lifecycle in containerized environments. Moreover, implementing this would ensure feature parity with the Desktop/GUI version's "Stop" button.Could you please fix this?
I look forward to hearing from you!!
Thanks in advance!