This reverts commit 973c6ff04d.
This commit is contained in:
iamqizhao 2016-05-06 11:57:52 -07:00
Родитель 973c6ff04d
Коммит 9604a2bb7d
2 изменённых файлов: 0 добавлений и 10 удалений

Просмотреть файл

@ -579,11 +579,6 @@ func (t *http2Client) getStream(f http2.Frame) (*Stream, bool) {
// Window updates will deliver to the controller for sending when // Window updates will deliver to the controller for sending when
// the cumulative quota exceeds the corresponding threshold. // the cumulative quota exceeds the corresponding threshold.
func (t *http2Client) updateWindow(s *Stream, n uint32) { func (t *http2Client) updateWindow(s *Stream, n uint32) {
s.mu.Lock()
defer s.mu.Unlock()
if s.state == streamDone {
return
}
if w := t.fc.onRead(n); w > 0 { if w := t.fc.onRead(n); w > 0 {
t.controlBuf.put(&windowUpdate{0, w}) t.controlBuf.put(&windowUpdate{0, w})
} }

Просмотреть файл

@ -303,11 +303,6 @@ func (t *http2Server) getStream(f http2.Frame) (*Stream, bool) {
// Window updates will deliver to the controller for sending when // Window updates will deliver to the controller for sending when
// the cumulative quota exceeds the corresponding threshold. // the cumulative quota exceeds the corresponding threshold.
func (t *http2Server) updateWindow(s *Stream, n uint32) { func (t *http2Server) updateWindow(s *Stream, n uint32) {
s.mu.Lock()
defer s.mu.Unlock()
if s.state == streamDone {
return
}
if w := t.fc.onRead(n); w > 0 { if w := t.fc.onRead(n); w > 0 {
t.controlBuf.put(&windowUpdate{0, w}) t.controlBuf.put(&windowUpdate{0, w})
} }