3x-ui/web/service
OleksandrParshyn 9ac8fdf3d3
Fix: Graceful Telegram bot shutdown to prevent 409 Conflict
Introduces a `botCancel` context and a global `StopBot()` function to ensure the Telegram bot's Long Polling operation is safely terminated (via context cancellation) before the service restarts. This prevents the "Conflict: another update consumer is running" (409) error upon panel restart.

Changes:
- Added `botCancel context.CancelFunc` to manage context cancellation.
- Implemented global `StopBot()` function.
- Updated `Tgbot.Stop()` to call `StopBot()`.
- Modified `Tgbot.OnReceive()` to use the new cancellable context for `UpdatesViaLongPolling`.
2025-10-31 13:29:20 +01:00
..
config.json dokodemo-door, socks renamed to mixed, tunnel 2025-09-09 13:57:40 +02:00
inbound.go gofmt 2025-10-21 13:02:55 +02:00
outbound.go docs: add comments for all functions 2025-09-20 09:35:50 +02:00
panel.go docs: add comments for all functions 2025-09-20 09:35:50 +02:00
server.go fix(import): prevent sqlite disk I/O error by validating temp DB then swapping 2025-10-14 22:03:17 +02:00
setting.go gofmt 2025-10-21 13:02:55 +02:00
tgbot.go Fix: Graceful Telegram bot shutdown to prevent 409 Conflict 2025-10-31 13:29:20 +01:00
user.go gofmt 2025-10-21 13:02:55 +02:00
warp.go docs: add comments for all functions 2025-09-20 09:35:50 +02:00
xray.go docs: add comments for all functions 2025-09-20 09:35:50 +02:00
xray_setting.go docs: add comments for all functions 2025-09-20 09:35:50 +02:00