mirror of
https://github.com/aler9/gortsplib
synced 2025-10-18 21:14:38 +08:00
replace ServerConn.EnableReadFrames with EnableFrames; prevent writing if the flag is disabled
This commit is contained in:
@@ -98,8 +98,7 @@ func handleConn(conn *gortsplib.ServerConn) {
|
||||
|
||||
readers[conn] = struct{}{}
|
||||
|
||||
conn.EnableReadFrames(true)
|
||||
conn.EnableReadTimeout(false)
|
||||
conn.EnableFrames(true)
|
||||
|
||||
return &base.Response{
|
||||
StatusCode: base.StatusOK,
|
||||
@@ -120,7 +119,7 @@ func handleConn(conn *gortsplib.ServerConn) {
|
||||
}, fmt.Errorf("someone is already publishing")
|
||||
}
|
||||
|
||||
conn.EnableReadFrames(true)
|
||||
conn.EnableFrames(true)
|
||||
conn.EnableReadTimeout(true)
|
||||
|
||||
return &base.Response{
|
||||
|
Reference in New Issue
Block a user