Set random session for RTSP server
This commit is contained in:
+1
-1
@@ -136,7 +136,7 @@ func (c *Conn) Accept() error {
|
|||||||
|
|
||||||
const transport = "RTP/AVP/TCP;unicast;interleaved="
|
const transport = "RTP/AVP/TCP;unicast;interleaved="
|
||||||
if strings.HasPrefix(tr, transport) {
|
if strings.HasPrefix(tr, transport) {
|
||||||
c.Session = "1" // TODO: fixme
|
c.Session = core.RandString(8, 10)
|
||||||
c.state = StateSetup
|
c.state = StateSetup
|
||||||
res.Header.Set("Transport", tr[:len(transport)+3])
|
res.Header.Set("Transport", tr[:len(transport)+3])
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user