Skip to content

Commit 6577757

Browse files
authored
Update main.go
added comment If you are serializing a candidate make sure to use ToJSON Using Marshal will result in errors around `sdpMid`
1 parent d9ca384 commit 6577757

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sfu-ws/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
259259
if i == nil {
260260
return
261261
}
262-
262+
// If you are serializing a candidate make sure to use ToJSON
263+
// Using Marshal will result in errors around `sdpMid`
263264
candidateString, err := json.Marshal(i.ToJSON())
264265
if err != nil {
265266
log.Println(err)

0 commit comments

Comments
 (0)