return rv;
}
+ if (!bidi) {
+ ngtcp2_strm_shutdown(strm, NGTCP2_STRM_FLAG_SHUT_WR);
+ strm->flags |= NGTCP2_STRM_FLAG_FIN_ACKED;
+ }
+
rv = conn_call_stream_open(conn, strm);
if (rv != 0) {
return rv;
}
-
- if (!bidi) {
- ngtcp2_strm_shutdown(strm, NGTCP2_STRM_FLAG_SHUT_WR);
- }
}
fr_end_offset = fr->offset + datalen;
if (res == 0) {
if (conn_handshake_remnants_left(conn)) {
- if (conn_handshake_probe_left(conn)) {
+ if (conn_handshake_probe_left(conn) ||
+ /* Allow exceeding CWND if an Handshake packet needs to be
+ sent in order to avoid dead lock. In some situation,
+ typically for client, 1 RTT packets may occupy in-flight
+ bytes (e.g., some large requests and PMTUD), and
+ Handshake packet loss shrinks CWND, and we may get in the
+ situation that we are unable to send Handshake packet. */
+ (conn->hs_pktns->rtb.num_pto_eliciting == 0 &&
+ ngtcp2_ksl_len(&conn->hs_pktns->crypto.tx.frq))) {
destlen = origlen;
}
nwrite = conn_write_handshake_pkts(conn, pi, dest, destlen,
res = nwrite;
dest += nwrite;
destlen -= (size_t)nwrite;
+ } else if (destlen == 0) {
+ res = conn_write_handshake_ack_pkts(conn, pi, dest, origlen, ts);
+ if (res) {
+ return res;
+ }
}
}
}
*
* Version number of the ngtcp2 library release.
*/
-#define NGTCP2_VERSION "0.13.0"
+#define NGTCP2_VERSION "0.13.1"
/**
* @macro
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
* becomes 0x010203.
*/
-#define NGTCP2_VERSION_NUM 0x000d00
+#define NGTCP2_VERSION_NUM 0x000d01
#endif /* VERSION_H */