Commit 024ef2d
committed
Add process exit handler to TelegramBot
Introduce a new event handler for the `ProcessExit` event in the
`TelegramBot` namespace within `BotApp.cs`. The `OnProcessExit`
method logs an informational message and cancels the
`_cancellationTokenSource` when the process exit event is received.
This ensures proper cleanup and logging when the application exits.1 parent 553e54f commit 024ef2d
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
125 | 132 | | |
126 | 133 | | |
127 | 134 | | |
| |||
0 commit comments