There was an error while loading. Please reload this page.
1 parent 9dc976a commit 0807c01Copy full SHA for 0807c01
1 file changed
Sources/NIOHTTP3/HTTP3StreamHandler.swift
@@ -304,9 +304,14 @@ package final class HTTP3StreamHandler: ChannelDuplexHandler {
304
}
305
case let error as QUICConnectionError:
306
self.logger.trace("Caught CONNECTION_CLOSE")
307
- // RFC 9114 § 8: "Receipt of an unknown error code MUST be treated as equivalent to
308
- // H3_NO_ERROR."
309
- let h3Code = error.isApplication ? HTTP3ErrorCode(rawValue: error.code) ?? .H3_NO_ERROR : nil
+ let h3Code: HTTP3ErrorCode?
+ if error.isApplication {
+ // RFC 9114 § 8: "Receipt of an unknown error code MUST be treated as equivalent to
310
+ // H3_NO_ERROR."
311
+ h3Code = HTTP3ErrorCode(rawValue: error.code) ?? .H3_NO_ERROR
312
+ } else {
313
+ h3Code = nil
314
+ }
315
context.fireErrorCaught(
316
HTTP3Error(
317
code: .remoteConnectionError,
0 commit comments