http3: make error codes public and consistent with http2 package (#3744)

* make http3 error codes public and consistent with http2 package

* typo on ErrNoError

* renaming of ErrCode values
This commit is contained in:
Jean-Francois Giorgi
2023-04-08 06:53:14 +02:00
committed by GitHub
parent c9ae152956
commit af517bdef1
8 changed files with 113 additions and 113 deletions

View File

@@ -67,7 +67,7 @@ func (r *body) Read(b []byte) (int, error) {
}
func (r *body) Close() error {
r.str.CancelRead(quic.StreamErrorCode(errorRequestCanceled))
r.str.CancelRead(quic.StreamErrorCode(ErrCodeRequestCanceled))
return nil
}
@@ -126,7 +126,7 @@ func (r *body) StreamID() quic.StreamID {
func (r *hijackableBody) Close() error {
r.requestDone()
// If the EOF was read, CancelRead() is a no-op.
r.str.CancelRead(quic.StreamErrorCode(errorRequestCanceled))
r.str.CancelRead(quic.StreamErrorCode(ErrCodeRequestCanceled))
return nil
}