File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -802,11 +802,6 @@ func (t *http2Client) handleData(f *http2.DataFrame) {
802802 return
803803 }
804804 if size > 0 {
805- if f .Header ().Flags .Has (http2 .FlagDataPadded ) {
806- if w := t .fc .onRead (uint32 (size ) - uint32 (len (f .Data ()))); w > 0 {
807- t .controlBuf .put (& windowUpdate {0 , w })
808- }
809- }
810805 s .mu .Lock ()
811806 if s .state == streamDone {
812807 s .mu .Unlock ()
@@ -825,6 +820,9 @@ func (t *http2Client) handleData(f *http2.DataFrame) {
825820 return
826821 }
827822 if f .Header ().Flags .Has (http2 .FlagDataPadded ) {
823+ if w := t .fc .onRead (uint32 (size ) - uint32 (len (f .Data ()))); w > 0 {
824+ t .controlBuf .put (& windowUpdate {0 , w })
825+ }
828826 if w := s .fc .onRead (uint32 (size ) - uint32 (len (f .Data ()))); w > 0 {
829827 t .controlBuf .put (& windowUpdate {s .id , w })
830828 }
Original file line number Diff line number Diff line change @@ -465,11 +465,6 @@ func (t *http2Server) handleData(f *http2.DataFrame) {
465465 return
466466 }
467467 if size > 0 {
468- if f .Header ().Flags .Has (http2 .FlagDataPadded ) {
469- if w := t .fc .onRead (uint32 (size ) - uint32 (len (f .Data ()))); w > 0 {
470- t .controlBuf .put (& windowUpdate {0 , w })
471- }
472- }
473468 s .mu .Lock ()
474469 if s .state == streamDone {
475470 s .mu .Unlock ()
@@ -486,6 +481,9 @@ func (t *http2Server) handleData(f *http2.DataFrame) {
486481 return
487482 }
488483 if f .Header ().Flags .Has (http2 .FlagDataPadded ) {
484+ if w := t .fc .onRead (uint32 (size ) - uint32 (len (f .Data ()))); w > 0 {
485+ t .controlBuf .put (& windowUpdate {0 , w })
486+ }
489487 if w := s .fc .onRead (uint32 (size ) - uint32 (len (f .Data ()))); w > 0 {
490488 t .controlBuf .put (& windowUpdate {s .id , w })
491489 }
You can’t perform that action at this time.
0 commit comments