Skip to content

Commit 6e65f26

Browse files
jasnellgengjiawen
authored andcommitted
quic: use QuicCallbackScope consistently for QuicSession
PR-URL: #34541 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
1 parent d96083b commit 6e65f26

File tree

2 files changed

+190
-96
lines changed

2 files changed

+190
-96
lines changed

lib/internal/quic/core.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -2287,12 +2287,11 @@ class QuicServerSession extends QuicSession {
22872287
async [kHandleOcsp](servername) {
22882288
const internalState = this[kInternalState];
22892289
const { context } = this[kInternalServerState];
2290-
const certificate = context?.context.getCertificate?.();
2291-
const issuer = context?.context.getIssuer?.();
2292-
return internalState.ocspHandler?.('request', {
2290+
if (!internalState.ocspHandler || !context) return undefined;
2291+
return internalState.ocspHandler('request', {
22932292
servername,
2294-
certificate,
2295-
issuer
2293+
certificate: context.context.getCertificate(),
2294+
issuer: context.context.getIssuer()
22962295
});
22972296
}
22982297

0 commit comments

Comments
 (0)