webrtc: fix returning code 404 when a stream does not exist (#3369)

This commit is contained in:
Alessandro Ros
2024-05-19 13:46:47 +02:00
committed by GitHub
parent 425b7fa4fb
commit d21506182b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ func (pm *dummyPathManager) AddPublisher(_ defs.PathAddPublisherReq) (defs.Path,
func (pm *dummyPathManager) AddReader(req defs.PathAddReaderReq) (defs.Path, *stream.Stream, error) {
if req.AccessRequest.Name == "nonexisting" {
return nil, nil, &defs.PathNoOnePublishingError{}
return nil, nil, defs.PathNoOnePublishingError{}
}
return pm.path, pm.path.stream, nil
}
+1 -1
View File
@@ -518,7 +518,7 @@ func (s *session) runRead() (int, error) {
return http.StatusUnauthorized, err
}
var terr2 *defs.PathNoOnePublishingError
var terr2 defs.PathNoOnePublishingError
if errors.As(err, &terr2) {
return http.StatusNotFound, err
}