File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -1980,16 +1980,9 @@ func (s *Server) serveConn(c net.Conn) error {
1980
1980
break
1981
1981
}
1982
1982
1983
- // Only flush the writer if we don't have another request in the pipeline.
1984
- // This is a big of an ugly optimization for https://www.techempower.com/benchmarks/
1985
- // This benchmark will send 16 pipelined requests. It is faster to pack as many responses
1986
- // in a TCP packet and send it back at once than waiting for a flush every request.
1987
- // In real world circumstances this behaviour could be argued as being wrong.
1988
- if br == nil || br .Buffered () == 0 || connectionClose {
1989
- err = bw .Flush ()
1990
- if err != nil {
1991
- break
1992
- }
1983
+ err = bw .Flush ()
1984
+ if err != nil {
1985
+ break
1993
1986
}
1994
1987
if connectionClose {
1995
1988
break
You can’t perform that action at this time.
0 commit comments