只执行一次

This commit is contained in:
liuxiaobo 2025-06-07 23:52:13 +08:00
parent 41bca1164d
commit 42b4d56214

View File

@ -175,6 +175,7 @@ func (s *BaseService) run() {
}
}
// 核心函数,让服务跑起来
func (s *BaseService) Run() {
s.once.Do(func() {
ksync.GoSafe(s.run, s.run)