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

@@ -126,8 +126,7 @@ func (ts *testServ) handleConn(conn *ServerConn) {
ts.readers[conn] = struct{}{}
conn.EnableReadFrames(true)
conn.EnableReadTimeout(false)
conn.EnableFrames(true)
return &base.Response{
StatusCode: base.StatusOK,
@@ -147,7 +146,7 @@ func (ts *testServ) handleConn(conn *ServerConn) {
}, fmt.Errorf("someone is already publishing")
}
conn.EnableReadFrames(true)
conn.EnableFrames(true)
conn.EnableReadTimeout(true)
return &base.Response{