File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1191,9 +1191,6 @@ void Stream::NotifyStreamOpened(stream_id id) {
11911191 // yet, but just for completeness, let's make sure.
11921192 if (outbound_) session ().ResumeStream (id);
11931193
1194- // We inform, the js side that the pending stream is now available
1195- EmitStreamAvailable ();
1196-
11971194 // This may make application data sendable, so keep it as the final action:
11981195 // sending can eventually call into JavaScript and destroy the stream.
11991196 BaseObjectPtr<Stream> self (this );
@@ -1202,6 +1199,9 @@ void Stream::NotifyStreamOpened(stream_id id) {
12021199 error_code internal_error = application.GetInternalErrorCode ();
12031200 Destroy (QuicError::ForApplication (internal_error));
12041201 }
1202+
1203+ // We inform, the js side that the pending stream is now available
1204+ if (!is_destroyed ()) EmitStreamAvailable ();
12051205}
12061206
12071207void Stream::NotifyReadableEnded (error_code code) {
You can’t perform that action at this time.
0 commit comments