make the FlowController thread-safe

This commit is contained in:
Marten Seemann
2016-05-17 23:39:07 +07:00
parent 15e7fe6c73
commit b9e141d277
3 changed files with 27 additions and 7 deletions

View File

@@ -140,9 +140,6 @@ func (s *stream) ReadByte() (byte, error) {
}
func (s *stream) UpdateSendFlowControlWindow(n protocol.ByteCount) {
s.mutex.Lock()
defer s.mutex.Unlock()
if s.flowController.UpdateSendWindow(n) {
s.windowUpdateOrErrCond.Broadcast()
}