Skip to content

Commit a69f8db

Browse files
committed
Remove redundant comment
Motivation: The last PR was auto-merged with a comment which was redundant after merging from main. Modifications: - Remove redundant comment - Simplify code now that the comment no longer needs to be inlined Result: Simpler code
1 parent 9d87e9c commit a69f8db

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
@@ -304,20 +304,12 @@ package final class HTTP3StreamHandler: ChannelDuplexHandler {
304304
}
305305
case let error as QUICConnectionError:
306306
self.logger.trace("Caught CONNECTION_CLOSE")
307-
let h3Code: HTTP3ErrorCode?
308-
if error.isApplication {
309-
// 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)
312-
} else {
313-
h3Code = nil
314-
}
315307
context.fireErrorCaught(
316308
HTTP3Error(
317309
code: .remoteConnectionError,
318310
message: error.reason,
319311
cause: error,
320-
errorCode: h3Code,
312+
errorCode: error.isApplication ? HTTP3ErrorCode(rawValue: error.code) : nil,
321313
location: .here()
322314
)
323315
)

0 commit comments

Comments
 (0)