Skip to content

Commit 3f94a75

Browse files
committed
Fix WebRTC card stuck in loading #1417
1 parent 780f378 commit 3f94a75

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

internal/streams/streams.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,20 @@ func Patch(name string, source string) *Stream {
100100
return nil
101101
}
102102

103+
if Validate(source) != nil {
104+
return nil
105+
}
106+
103107
// check an existing stream with this name
104108
if stream, ok := streams[name]; ok {
105109
stream.SetSource(source)
106110
return stream
107111
}
108112

109113
// create new stream with this name
110-
return New(name, source)
114+
stream := NewStream(source)
115+
streams[name] = stream
116+
return stream
111117
}
112118

113119
func GetOrPatch(query url.Values) *Stream {

0 commit comments

Comments
 (0)