Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit bfc228e

Browse files
jasnelladdaleax
authored andcommitted
quic: add QuicSessionListener
Fixes: #208 PR-URL: #207 Reviewed-By: #207
1 parent 3eb955d commit bfc228e

3 files changed

Lines changed: 643 additions & 330 deletions

File tree

src/node_quic_http3_application.cc

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -553,19 +553,7 @@ void Http3Application::H3AckedStreamData(
553553
void Http3Application::H3StreamClose(
554554
int64_t stream_id,
555555
uint64_t app_error_code) {
556-
Environment* env = Session()->env();
557-
Local<Value> argv[] = {
558-
Number::New(env->isolate(), static_cast<double>(stream_id)),
559-
Number::New(env->isolate(), static_cast<double>(app_error_code))
560-
};
561-
562-
// Grab a shared pointer to this to prevent the QuicSession
563-
// from being freed while the MakeCallback is running.
564-
BaseObjectPtr<QuicSession> ptr(Session());
565-
Session()->MakeCallback(
566-
env->quic_on_stream_close_function(),
567-
arraysize(argv),
568-
argv);
556+
Session()->Listener()->OnStreamClose(stream_id, app_error_code);
569557
}
570558

571559
QuicStream* Http3Application::FindOrCreateStream(int64_t stream_id) {

0 commit comments

Comments
 (0)