intermediate change

This commit is contained in:
Mahak Mukhi
2017-01-27 11:15:56 -08:00
parent 49d2a88c27
commit b2448f6c9b

View File

@ -1075,12 +1075,16 @@ func (t *http2Client) controller() {
}
isPingSent := false
keepalivePing := &ping{data: [8]byte{}}
cchan := t.controlBuf.get()
wchan := nil
for {
select {
case i := <-t.controlBuf.get():
case i := <-cchan:
t.controlBuf.load()
select {
case <-t.writableChan:
wchan = t.writableChan
cchan = nil
continue
case <-wchan:
switch i := i.(type) {
case *windowUpdate:
t.framer.writeWindowUpdate(true, i.streamID, i.increment)
@ -1100,11 +1104,10 @@ func (t *http2Client) controller() {
default:
grpclog.Printf("transport: http2Client.controller got unexpected item type %v\n", i)
}
t.writableChan <- 0
wchan <- 0
wchan = nil
cchan = t.controlBuf.get()
continue
case <-t.shutdownChan:
return
}
case <-timer.C:
t.mu.Lock()
ns := len(t.activeStreams)