mirror of
https://github.com/aler9/gortsplib
synced 2025-10-07 08:01:14 +08:00
replace ServerConn.EnableReadFrames with EnableFrames; prevent writing if the flag is disabled
This commit is contained in:
@@ -97,8 +97,7 @@ func handleConn(conn *gortsplib.ServerConn) {
|
||||
|
||||
readers[conn] = struct{}{}
|
||||
|
||||
conn.EnableReadFrames(true)
|
||||
conn.EnableReadTimeout(false)
|
||||
conn.EnableFrames(true)
|
||||
|
||||
return &base.Response{
|
||||
StatusCode: base.StatusOK,
|
||||
@@ -119,7 +118,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