| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2ea9d19 commit 9445e27
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -540,7 +540,8 @@ void Session::Application::SendPendingData() { | |||
| 540 | 540 | // We call Application::ResumeStream directly (not Session::ResumeStream) | |
| 541 | 541 | // to avoid creating a SendPendingDataScope — we're already inside | |
| 542 | 542 | // SendPendingData and re-entering would just hit nwrite=0 again. | |
| 543 | - if (nwrite == 0) { | ||
| 543 | + if (nwrite == 0 && | ||
| 544 | + (stream_data.id >= 0 || !session_->HasPendingDatagrams())) { | ||
| 544 | 545 | Debug(session_, "Congestion or not our turn to send"); | |
| 545 | 546 | if (stream_data.id >= 0 && (stream_data.count > 0 || stream_data.fin)) { | |
| 546 | 547 | ResumeStream(stream_data.id); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2601,6 +2601,7 @@ datagram_id Session::SendDatagram(Store&& data) { | |||
| 2601 | 2601 | return did; | |
| 2602 | 2602 | } | |
| 2603 | 2603 | } | |
| 2604 | + Session::SendPendingDataScope send_scope(this); | ||
| 2604 | 2605 | ||
| 2605 | 2606 | // Queue the datagram. It will be serialized into packets by | |
| 2606 | 2607 | // SendPendingData alongside stream data. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -100,6 +100,9 @@ const clientSession = await connect(serverEndpoint.address, { | |||
| 100 | 100 | family: 'ipv6', | |
| 101 | 101 | }, | |
| 102 | 102 | }, | |
| 103 | + maxDatagramSendAttempts: 100, // While the connection is restablished, | ||
| 104 | + // all the acknowledgement packets of ngtcp2 are counted as send attempts | ||
| 105 | + // so either this or a delay, or a change in ngtcp2 interfaces | ||
| 103 | 106 | }); | |
| 104 | 107 | await clientSession.opened; | |
| 105 | 108 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,6 +78,9 @@ const clientSession = await connect(serverEndpoint.address, { | |||
| 78 | 78 | strictEqual(oldRemote, null); | |
| 79 | 79 | strictEqual(preferred, true); | |
| 80 | 80 | }), | |
| 81 | + maxDatagramSendAttempts: 100, // While the connection is restablished, | ||
| 82 | + // all the acknowledgement packets of ngtcp2 are counted as send attempts | ||
| 83 | + // so either this or a delay, or a change in ngtcp2 interfaces | ||
| 81 | 84 | }); | |
| 82 | 85 | await clientSession.opened; | |
| 83 | 86 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments