Set random session for RTSP server

This commit is contained in:
Alexey Khit
2023-04-15 12:50:50 +03:00
parent 8dd9991268
commit 25dc3664fd
+1 -1
View File
@@ -136,7 +136,7 @@ func (c *Conn) Accept() error {
const transport = "RTP/AVP/TCP;unicast;interleaved="
if strings.HasPrefix(tr, transport) {
c.Session = "1" // TODO: fixme
c.Session = core.RandString(8, 10)
c.state = StateSetup
res.Header.Set("Transport", tr[:len(transport)+3])
} else {