Handle sending just fine
This commit is contained in:
parent
b3a2f8837c
commit
1aae450303
|
@ -631,8 +631,8 @@ int Client::write_quic() {
|
||||||
auto s = static_cast<Http3Session *>(session.get());
|
auto s = static_cast<Http3Session *>(session.get());
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
int64_t stream_id;
|
int64_t stream_id = -1;
|
||||||
int fin;
|
int fin = 0;
|
||||||
ssize_t sveccnt = 0;
|
ssize_t sveccnt = 0;
|
||||||
|
|
||||||
if (ngtcp2_conn_get_max_data_left(quic.conn)) {
|
if (ngtcp2_conn_get_max_data_left(quic.conn)) {
|
||||||
|
@ -643,7 +643,7 @@ int Client::write_quic() {
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t ndatalen;
|
ssize_t ndatalen;
|
||||||
if (sveccnt == 0) {
|
if (sveccnt == 0 && stream_id == -1) {
|
||||||
auto nwrite =
|
auto nwrite =
|
||||||
ngtcp2_conn_write_pkt(quic.conn, &ps.path, buf.data(),
|
ngtcp2_conn_write_pkt(quic.conn, &ps.path, buf.data(),
|
||||||
quic.max_pktlen, timestamp(worker->loop));
|
quic.max_pktlen, timestamp(worker->loop));
|
||||||
|
@ -714,7 +714,7 @@ int Client::write_quic() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ndatalen > 0) {
|
if (ndatalen >= 0) {
|
||||||
if (s->add_write_offset(stream_id, ndatalen) != 0) {
|
if (s->add_write_offset(stream_id, ndatalen) != 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue