replace ServerConn.EnableReadFrames with EnableFrames; prevent writing if the flag is disabled

This commit is contained in:
aler9
2020-12-15 20:07:04 +01:00
parent 27636bc810
commit e5b1260075
4 changed files with 24 additions and 22 deletions

View File

@@ -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{