There was an error while loading. Please reload this page.
1 parent 423e261 commit 157417aCopy full SHA for 157417a
1 file changed
src/quic/session.cc
@@ -1818,6 +1818,14 @@ ssize_t Session::TryWritePendingDatagram(PathStorage* path,
1818
Debug(this, "Datagram %" PRIu64 " not accepted into packet", dg.id);
1819
}
1820
1821
+ // ngtcp2 can return a positive number if the packet was nearly full, and so
1822
+ // it finalized without waiting for more. This isn't an error, and can happen
1823
+ // with or without `accepted` being true (if false, it stays queued).
1824
+ if (dg_nwrite > 0) {
1825
+ if (!accepted) dg.send_attempts++;
1826
+ return dg_nwrite;
1827
+ }
1828
+
1829
switch (dg_nwrite) {
1830
case 0: {
1831
// If dg_nwrite is 0, we are either congestion controlled or
0 commit comments