Skip to content

Commit 4db975e

Browse files
committed
quic: move EmitStreamAvailable
1 parent ddfdc5d commit 4db975e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/quic/streams.cc‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

12071207
void Stream::NotifyReadableEnded(error_code code) {

0 commit comments

Comments
 (0)