Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an error return to makeStreamID to make issues explicit #400

Merged
merged 2 commits into from
May 28, 2024

Conversation

thomshutt
Copy link
Contributor

@thomshutt thomshutt commented May 13, 2024

This is to allow us to signal different types of errors in go-livepeer and ultimately pass back different HTTP statuses from the Broadcaster depending on the stream creation failure reason

@thomshutt thomshutt requested review from leszko and mjh1 May 13, 2024 08:39
gotStream func(url *url.URL, rtmpStrm stream.RTMPVideoStream) error,
endStream func(url *url.URL, rtmpStrm stream.RTMPVideoStream) error) {

if self.RtmpServer != nil {
self.RtmpServer.HandlePublish = func(conn *joy4rtmp.Conn) {
glog.V(2).Infof("RTMP server got upstream: %v", conn.URL)

strmID := makeStreamID(conn.URL)
if strmID == nil || strmID.StreamID() == "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this makeStreamID() actually implemented? In go-livepeer? I wonder if changing this condition here won't bring any regression.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, in go-livepeer. I think that we can probably keep the original check as well though if we'd like to be safe

@thomshutt thomshutt merged commit 343a3dd into master May 28, 2024
3 checks passed
@thomshutt thomshutt deleted the makeStreamID-err branch May 28, 2024 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants