quic: fix internal error code conversion

Signed-off-by: Efe Karasakal <hi@efe.dev>
PR-URL: https://github.com/nodejs/node/pull/66967
Reviewed-By: Tim Perry <pimterry@gmail.com>
This commit is contained in:
Efe Karasakal authored and GitHub committed 2026-10-30 18:19:28 +00:00
1 parent 1915b77157
commit aadb9118ed
2 files changed
+2 -3

No files matched your search

+1 -1
View File
@@ -3649,7 +3649,7 @@ void Session::SendConnectionClose() {
auto ErrorAndSilentClose = [&] {
Debug(this, "Failed to create connection close packet");
SetLastError(QuicError::ForNgtcp2Error(NGTCP2_INTERNAL_ERROR));
SetLastError(QuicError::ForNgtcp2Error(NGTCP2_ERR_INTERNAL));
Close(CloseMethod::SILENT);
};
+1 -2
View File
@@ -702,8 +702,7 @@ class Stream::Outbound final : public MemoryRetainer {
// but we have an error! oh no! We need to error the stream.
if (flags_.next_pending) {
flags_.next_pending = false;
stream_->Destroy(
QuicError::ForNgtcp2Error(NGTCP2_INTERNAL_ERROR));
stream_->Destroy(QuicError::ForNgtcp2Error(NGTCP2_ERR_INTERNAL));
// We do not need to worry about calling MarkErrored in this case
// since we are immediately destroying the stream which will
// release the outbound buffer anyway.