forked from quic-go/quic-go
@@ -13,11 +13,6 @@ import (
|
||||
"github.com/lucas-clemente/quic-go/utils"
|
||||
)
|
||||
|
||||
var (
|
||||
errFlowControlViolation = qerr.FlowControlReceivedTooMuchData
|
||||
errConnectionFlowControlViolation = qerr.FlowControlReceivedTooMuchData
|
||||
)
|
||||
|
||||
// A Stream assembles the data from StreamFrames and provides a super-convenient Read-Interface
|
||||
//
|
||||
// Read() and Write() may be called concurrently, but multiple calls to Read() or Write() individually must be synchronized manually.
|
||||
@@ -203,10 +198,10 @@ func (s *stream) AddStreamFrame(frame *frames.StreamFrame) error {
|
||||
err := s.flowControlManager.UpdateHighestReceived(s.streamID, maxOffset)
|
||||
|
||||
if err == flowcontrol.ErrStreamFlowControlViolation {
|
||||
return errFlowControlViolation
|
||||
return qerr.FlowControlReceivedTooMuchData
|
||||
}
|
||||
if err == flowcontrol.ErrConnectionFlowControlViolation {
|
||||
return errConnectionFlowControlViolation
|
||||
return qerr.FlowControlReceivedTooMuchData
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user