fix: push proxy push on publish

This commit is contained in:
langhuihui
2025-02-26 15:25:58 +08:00
parent 7a7b77d2b4
commit d92d3b5820
3 changed files with 23 additions and 5 deletions

View File

@@ -108,8 +108,17 @@ func (d *PushProxy) ChangeStatus(status byte) {
d.Update()
switch status {
case PushProxyStatusOnline:
if d.PushOnStart && from == PushProxyStatusOffline {
d.Handler.Push()
if from == PushProxyStatusOffline {
if d.PushOnStart {
d.Handler.Push()
} else {
d.server.Streams.Call(func() error {
if d.server.Streams.Has(d.GetStreamPath()) {
d.Handler.Push()
}
return nil
})
}
}
}
}