From 73db4d7a046e2c8ff537d157c9b31679d1743904 Mon Sep 17 00:00:00 2001 From: Lucas Clemente Date: Mon, 11 Jul 2016 17:54:22 +0200 Subject: [PATCH] remove stream.contributesToConnectionFlowControl --- stream.go | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/stream.go b/stream.go index bb57dcd9..c22ab1b0 100644 --- a/stream.go +++ b/stream.go @@ -46,24 +46,15 @@ type stream struct { doneWritingOrErrCond sync.Cond flowControlManager flowcontrol.FlowControlManager - // TODO: remove this - contributesToConnectionFlowControl bool } // newStream creates a new Stream func newStream(onData func(), connectionParameterManager *handshake.ConnectionParametersManager, flowControlManager flowcontrol.FlowControlManager, StreamID protocol.StreamID) (*stream, error) { s := &stream{ - onData: onData, - streamID: StreamID, - flowControlManager: flowControlManager, - contributesToConnectionFlowControl: true, - frameQueue: newStreamFrameSorter(), - } - - // crypto and header stream don't contribute to connection level flow control - // TODO: only include the header stream here when using HTTP2 - if s.streamID == 1 || s.streamID == 3 { - s.contributesToConnectionFlowControl = false + onData: onData, + streamID: StreamID, + flowControlManager: flowControlManager, + frameQueue: newStreamFrameSorter(), } s.newFrameOrErrCond.L = &s.mutex