mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-22 16:41:30 +00:00
platform: Fix missing log on apple platforms
This commit is contained in:
parent
b48c471e6a
commit
fdc451f7c6
|
@ -58,16 +58,19 @@ 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.savedLines.Init()
|
|
||||||
select {
|
|
||||||
case s.logReset <- struct{}{}:
|
|
||||||
default:
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
s.service = newService
|
s.service = newService
|
||||||
s.notifyURLTestUpdate()
|
s.notifyURLTestUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *CommandServer) ResetLog() {
|
||||||
|
s.savedLines.Init()
|
||||||
|
select {
|
||||||
|
case s.logReset <- struct{}{}:
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (s *CommandServer) notifyURLTestUpdate() {
|
func (s *CommandServer) notifyURLTestUpdate() {
|
||||||
select {
|
select {
|
||||||
case s.urlTestUpdate <- struct{}{}:
|
case s.urlTestUpdate <- struct{}{}:
|
||||||
|
|
Loading…
Reference in a new issue