3x-ui/internal/web/service/tgbot
PathGao ad5f2a28cb
fix(xray): synchronize lifecycle state (#6138)
* fix(xray): synchronize lifecycle snapshots

Protect process replacement and result caching with a lifecycle state object, so read paths keep one process snapshot while restarts swap state safely. Bound version probing to prevent a stalled binary from holding the restart lock.

* test(xray): cover concurrent lifecycle reads

Exercise status, result, and traffic reads while the managed process is replaced, so the race detector guards the lifecycle snapshot boundary.

* fix(xray): guard process config snapshots

Synchronize hot-applied config snapshots, keep Telegram reads on one lifecycle snapshot, and strengthen lifecycle timeout and concurrency regression coverage.

---------

Co-authored-by: PathGao <gaoyanbo@gaoyanbodeMacBook-Air.local>
2026-07-29 21:00:29 +02:00
..
tgbot.go feat(tgbot): register usage, inbound, restart and clearall in the bot command menu 2026-07-03 09:36:53 +02:00
tgbot_callback_auth_test.go Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
tgbot_client.go fix(xray): synchronize lifecycle state (#6138) 2026-07-29 21:00:29 +02:00
tgbot_delete_after_test.go Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
tgbot_event.go feat(memory): add memory threshold alerts (#5366) 2026-06-21 17:45:33 +02:00
tgbot_inbound.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
tgbot_report.go fix(xray): synchronize lifecycle state (#6138) 2026-07-29 21:00:29 +02:00
tgbot_router.go Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
tgbot_send.go Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
tgbot_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00