mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-11-29 10:52:54 +00:00
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`. |
||
|---|---|---|
| .. | ||
| config.json | ||
| inbound.go | ||
| outbound.go | ||
| panel.go | ||
| server.go | ||
| setting.go | ||
| tgbot.go | ||
| user.go | ||
| warp.go | ||
| xray.go | ||
| xray_setting.go | ||