server: remove dashes from session ID (#278)

This commit is contained in:
Alessandro Ros
2023-05-08 16:44:22 +02:00
committed by GitHub
parent 67d4106adc
commit 744dec8257
2 changed files with 6 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ import (
"sync/atomic"
"time"
"github.com/google/uuid"
"github.com/pion/rtcp"
"github.com/pion/rtp"
@@ -198,11 +199,13 @@ type ServerSession struct {
func newServerSession(
s *Server,
secretID string,
author *ServerConn,
) *ServerSession {
ctx, ctxCancel := context.WithCancel(s.ctx)
// use an UUID without dashes, since dashes confuse some clients.
secretID := strings.ReplaceAll(uuid.New().String(), "-", "")
ss := &ServerSession{
s: s,
secretID: secretID,