Skip to content

Commit 862762f

Browse files
committed
Merge branch 'main' into handle-input-closed
2 parents f49dda4 + 6cb7c32 commit 862762f

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

Sources/NIOHTTP3/HTTP3StreamHandler.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -332,20 +332,12 @@ package final class HTTP3StreamHandler: ChannelDuplexHandler {
332332
}
333333
case let error as QUICConnectionError:
334334
self.logger.trace("Caught CONNECTION_CLOSE")
335-
let h3Code: HTTP3ErrorCode?
336-
if error.isApplication {
337-
// RFC 9114 § 8: "Receipt of an unknown error code MUST be treated as equivalent to
338-
// H3_NO_ERROR."
339-
h3Code = HTTP3ErrorCode(rawValue: error.code)
340-
} else {
341-
h3Code = nil
342-
}
343335
context.fireErrorCaught(
344336
HTTP3Error(
345337
code: .remoteConnectionError,
346338
message: error.reason,
347339
cause: error,
348-
errorCode: h3Code,
340+
errorCode: error.isApplication ? HTTP3ErrorCode(rawValue: error.code) : nil,
349341
location: .here()
350342
)
351343
)

0 commit comments

Comments
 (0)