introduce a quic.StreamError type and use it for stream cancelations

This commit is contained in:
Marten Seemann
2021-04-26 16:26:05 +07:00
parent 93cfef57ca
commit 90727cb41a
26 changed files with 128 additions and 114 deletions

View File

@@ -93,6 +93,6 @@ func (r *body) requestDone() {
func (r *body) Close() error {
r.requestDone()
// If the EOF was read, CancelRead() is a no-op.
r.str.CancelRead(quic.ApplicationErrorCode(errorRequestCanceled))
r.str.CancelRead(quic.StreamErrorCode(errorRequestCanceled))
return nil
}