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

Commit a4536e2

Browse files
committed
quic: add QuicSessionListener
1 parent 4886f13 commit a4536e2

File tree

3 files changed

+639
-319
lines changed

3 files changed

+639
-319
lines changed

src/node_quic_http3_application.cc

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -521,19 +521,7 @@ void Http3Application::H3AckedStreamData(
521521
void Http3Application::H3StreamClose(
522522
int64_t stream_id,
523523
uint64_t app_error_code) {
524-
Environment* env = Session()->env();
525-
Local<Value> argv[] = {
526-
Number::New(env->isolate(), static_cast<double>(stream_id)),
527-
Number::New(env->isolate(), static_cast<double>(app_error_code))
528-
};
529-
530-
// Grab a shared pointer to this to prevent the QuicSession
531-
// from being freed while the MakeCallback is running.
532-
BaseObjectPtr<QuicSession> ptr(Session());
533-
Session()->MakeCallback(
534-
env->quic_on_stream_close_function(),
535-
arraysize(argv),
536-
argv);
524+
Session()->Listener()->OnStreamClose(stream_id, app_error_code);
537525
}
538526

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

0 commit comments

Comments
 (0)