New features: TG Telegram robot terminal [One-click configuration] and [Subscription conversion]

This commit is contained in:
心隨緣動 2025-10-08 00:45:42 +08:00 committed by GitHub
parent 684598a32f
commit f06bb26fc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -478,15 +478,15 @@ func (s *Server) Start() (err error) {
func (s *Server) Stop() error {
s.cancel()
s.xrayService.StopXray()
if s.cron != nil {
s.cron.Stop()
}
// 只有在断言成功后,才能调用只在 *service.Tgbot 上定义的 Stop() 和 IsRunning() 方法。
if tgBot, ok := s.tgbotService.(*service.Tgbot); ok {
if tgBot.IsRunning() {
tgBot.Stop()
}
}
if s.tgbotService.IsRunning() {
s.tgbotService.Stop()
}
var err1 error
var err2 error
if s.httpServer != nil {