platform: Fix missing log on apple platforms

This commit is contained in:
世界 2024-03-14 13:40:02 +08:00
parent b48c471e6a
commit fdc451f7c6
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -58,15 +58,18 @@ func (s *CommandServer) SetService(newService *BoxService) {
if newService != nil { if newService != nil {
service.PtrFromContext[urltest.HistoryStorage](newService.ctx).SetHook(s.urlTestUpdate) service.PtrFromContext[urltest.HistoryStorage](newService.ctx).SetHook(s.urlTestUpdate)
newService.instance.Router().ClashServer().(*clashapi.Server).SetModeUpdateHook(s.modeUpdate) newService.instance.Router().ClashServer().(*clashapi.Server).SetModeUpdateHook(s.modeUpdate)
}
s.service = newService
s.notifyURLTestUpdate()
}
func (s *CommandServer) ResetLog() {
s.savedLines.Init() s.savedLines.Init()
select { select {
case s.logReset <- struct{}{}: case s.logReset <- struct{}{}:
default: default:
} }
} }
s.service = newService
s.notifyURLTestUpdate()
}
func (s *CommandServer) notifyURLTestUpdate() { func (s *CommandServer) notifyURLTestUpdate() {
select { select {