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

@ -79,7 +79,7 @@ func (w *requestWriter) WriteRequest(str quic.Stream, req *http.Request, gzip bo
if rerr == io.EOF {
break
}
str.CancelWrite(quic.ApplicationErrorCode(errorRequestCanceled))
str.CancelWrite(quic.StreamErrorCode(errorRequestCanceled))
w.logger.Errorf("Error writing request: %s", rerr)
return
}