Fix tfo headroom

This commit is contained in:
世界 2022-10-10 13:31:45 +08:00
parent a61a64bf9e
commit b8009d61b2
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -113,6 +113,10 @@ func (c *slowOpenConn) WriterReplaceable() bool {
return c.conn != nil return c.conn != nil
} }
func (c *slowOpenConn) LazyHeadroom() bool {
return c.conn == nil
}
func (c *slowOpenConn) ReadFrom(r io.Reader) (n int64, err error) { func (c *slowOpenConn) ReadFrom(r io.Reader) (n int64, err error) {
if c.conn != nil { if c.conn != nil {
return bufio.Copy(c.conn, r) return bufio.Copy(c.conn, r)