Latest update - 9012
This commit is contained in:
@@ -46,8 +46,8 @@ ngx_connection_t *
|
|||||||
ngx_quic_open_stream(ngx_connection_t *c, ngx_uint_t bidi)
|
ngx_quic_open_stream(ngx_connection_t *c, ngx_uint_t bidi)
|
||||||
{
|
{
|
||||||
uint64_t id;
|
uint64_t id;
|
||||||
ngx_connection_t *pc;
|
ngx_connection_t *pc, *sc;
|
||||||
ngx_quic_stream_t *nqs;
|
ngx_quic_stream_t *qs;
|
||||||
ngx_quic_connection_t *qc;
|
ngx_quic_connection_t *qc;
|
||||||
|
|
||||||
pc = c->quic ? c->quic->parent : c;
|
pc = c->quic ? c->quic->parent : c;
|
||||||
@@ -101,12 +101,21 @@ ngx_quic_open_stream(ngx_connection_t *c, ngx_uint_t bidi)
|
|||||||
qc->streams.server_streams_uni++;
|
qc->streams.server_streams_uni++;
|
||||||
}
|
}
|
||||||
|
|
||||||
nqs = ngx_quic_create_stream(pc, id);
|
qs = ngx_quic_create_stream(pc, id);
|
||||||
if (nqs == NULL) {
|
if (qs == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return nqs->connection;
|
sc = qs->connection;
|
||||||
|
|
||||||
|
sc->write->active = 1;
|
||||||
|
sc->write->ready = 1;
|
||||||
|
|
||||||
|
if (bidi) {
|
||||||
|
sc->read->active = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -534,6 +543,13 @@ ngx_quic_init_stream_handler(ngx_event_t *ev)
|
|||||||
|
|
||||||
ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, "quic init stream");
|
ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, "quic init stream");
|
||||||
|
|
||||||
|
if ((qs->id & NGX_QUIC_STREAM_UNIDIRECTIONAL) == 0) {
|
||||||
|
c->write->active = 1;
|
||||||
|
c->write->ready = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
c->read->active = 1;
|
||||||
|
|
||||||
ngx_queue_remove(&qs->queue);
|
ngx_queue_remove(&qs->queue);
|
||||||
|
|
||||||
c->listening->handler(c);
|
c->listening->handler(c);
|
||||||
@@ -704,19 +720,6 @@ ngx_quic_create_stream(ngx_connection_t *c, uint64_t id)
|
|||||||
|
|
||||||
log->connection = sc->number;
|
log->connection = sc->number;
|
||||||
|
|
||||||
if ((id & NGX_QUIC_STREAM_UNIDIRECTIONAL) == 0
|
|
||||||
|| (id & NGX_QUIC_STREAM_SERVER_INITIATED))
|
|
||||||
{
|
|
||||||
sc->write->active = 1;
|
|
||||||
sc->write->ready = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((id & NGX_QUIC_STREAM_UNIDIRECTIONAL) == 0
|
|
||||||
|| (id & NGX_QUIC_STREAM_SERVER_INITIATED) == 0)
|
|
||||||
{
|
|
||||||
sc->read->active = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (id & NGX_QUIC_STREAM_UNIDIRECTIONAL) {
|
if (id & NGX_QUIC_STREAM_UNIDIRECTIONAL) {
|
||||||
if (id & NGX_QUIC_STREAM_SERVER_INITIATED) {
|
if (id & NGX_QUIC_STREAM_SERVER_INITIATED) {
|
||||||
qs->send_max_data = qc->ctp.initial_max_stream_data_uni;
|
qs->send_max_data = qc->ctp.initial_max_stream_data_uni;
|
||||||
|
|||||||
Reference in New Issue
Block a user