Skip to content

Commit dcc348a

Browse files
manNomiaduh95
authored andcommitted
quic: serialize stream reset code as string
Signed-off-by: manNomi <hanmw110@naver.com> PR-URL: #64577 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
1 parent 1c09165 commit dcc348a

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

lib/internal/quic/state.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ class QuicStreamState {
926926
wantsHeaders,
927927
wantsTrailers,
928928
early,
929-
resetCode,
929+
resetCode: `${resetCode}`,
930930
writeDesiredSize,
931931
budget,
932932
};

test/parallel/test-quic-internal-endpoint-stats-state.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ strictEqual(sessionState.maxDatagramSize, 0);
179179
strictEqual(sessionState.lastDatagramId, 0n);
180180

181181
strictEqual(typeof streamState.toJSON(), 'object');
182+
strictEqual(JSON.parse(streamState.toString()).resetCode, '0');
182183
strictEqual(typeof sessionState.toJSON(), 'object');
183184
strictEqual(typeof inspect(streamState), 'string');
184185
strictEqual(typeof inspect(sessionState), 'string');

0 commit comments

Comments
 (0)