Skip to content

Commit f64faa5

Browse files
jason-shenSean-Der
authored andcommitted
Add comment about candidate marshal in sfu-ws
If you are serializing a candidate make sure to use ToJSON Using Marshal will result in errors around `sdpMid`
1 parent b4164e3 commit f64faa5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sfu-ws/main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
268268
if i == nil {
269269
return
270270
}
271-
271+
// If you are serializing a candidate make sure to use ToJSON
272+
// Using Marshal will result in errors around `sdpMid`
272273
candidateString, err := json.Marshal(i.ToJSON())
273274
if err != nil {
274275
log.Println(err)

0 commit comments

Comments
 (0)