Fix emitting log message if a non-existing resource should be played

This commit is contained in:
Ingo Oppermann 2024-02-12 14:33:14 +01:00
parent cf5192977b
commit ab66c37ded
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E

View File

@ -405,7 +405,12 @@ func (s *server) handleSubscribe(conn srt.Conn) {
ch := s.channels[si.Resource]
s.lock.RUnlock()
if ch == nil && s.proxy != nil {
if ch == nil {
if s.proxy == nil {
s.log(identity, "PLAY", "NOTFOUND", si.Resource, "no publisher for this resource found", client)
return
}
// Check in the cluster for the stream and proxy it
srturl, err := s.proxy.GetURL("srt", si.Resource)
if err != nil {