|
|
@@ -278,6 +278,16 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
|
|
|
pushEnabled: true,
|
|
|
}
|
|
|
|
|
|
+ // The net/http package sets the write deadline from the
|
|
|
+ // http.Server.WriteTimeout during the TLS handshake, but then
|
|
|
+ // passes the connection off to us with the deadline already
|
|
|
+ // set. Disarm it here so that it is not applied to additional
|
|
|
+ // streams opened on this connection.
|
|
|
+ // TODO: implement WriteTimeout fully. See Issue 18437.
|
|
|
+ if sc.hs.WriteTimeout != 0 {
|
|
|
+ sc.conn.SetWriteDeadline(time.Time{})
|
|
|
+ }
|
|
|
+
|
|
|
if s.NewWriteScheduler != nil {
|
|
|
sc.writeSched = s.NewWriteScheduler()
|
|
|
} else {
|