forked from quic-go/quic-go
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:
committed by
GitHub
parent
c9ae152956
commit
af517bdef1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user