mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Release 2.29.3
- [BUGFIX] Do not send RESET_STREAM if writing to stream is already finished. - perf_client: wait for all ACKs before exiting. - Improve how generated RESET_STREAM is logged. - Fix compilation in different combos of adv_tick/conn_stats flags. - Move qpack warning disablement into src/liblsquic/CMakeLists.txt.
This commit is contained in:
parent
f1d5a1a4de
commit
99a1ad0f24
20 changed files with 209 additions and 302 deletions
|
@ -85,7 +85,13 @@ SET(lsquic_STAT_SRCS
|
|||
)
|
||||
|
||||
IF(NOT MSVC)
|
||||
set_source_files_properties(ls-qpack/lsqpack.c PROPERTIES COMPILE_FLAGS -Wno-uninitialized)
|
||||
SET(QPACK_FLAGS "-Wno-uninitialized")
|
||||
INCLUDE(CheckCCompilerFlag)
|
||||
CHECK_C_COMPILER_FLAG(-Wno-implicit-fallthrough HAS_NO_IMPLICIT_FALLTHROUGH)
|
||||
IF (HAS_NO_IMPLICIT_FALLTHROUGH)
|
||||
SET(QPACK_FLAGS "${QPACK_FLAGS} -Wno-implicit-fallthrough")
|
||||
ENDIF()
|
||||
set_source_files_properties(ls-qpack/lsqpack.c PROPERTIES COMPILE_FLAGS ${QPACK_FLAGS})
|
||||
ENDIF()
|
||||
|
||||
include_directories(ls-qpack)
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
#define LSQUIC_DEBUG_NEXT_ADV_TICK 1
|
||||
#endif
|
||||
|
||||
#if LSQUIC_DEBUG_NEXT_ADV_TICK
|
||||
#if LSQUIC_DEBUG_NEXT_ADV_TICK || LSQUIC_CONN_STATS
|
||||
#include "lsquic_alarmset.h"
|
||||
#endif
|
||||
|
||||
|
@ -3161,6 +3161,8 @@ lsquic_engine_earliest_adv_tick (lsquic_engine_t *engine, int *diff)
|
|||
lsquic_time_t now, next_time;
|
||||
#if LSQUIC_DEBUG_NEXT_ADV_TICK || LSQUIC_CONN_STATS
|
||||
struct lsquic_conn *conn;
|
||||
#endif
|
||||
#if LSQUIC_DEBUG_NEXT_ADV_TICK
|
||||
const enum lsq_log_level L = LSQ_LOG_DEBUG; /* Easy toggle */
|
||||
#endif
|
||||
|
||||
|
|
|
@ -3807,7 +3807,7 @@ full_conn_ci_close (struct lsquic_conn *lconn)
|
|||
{
|
||||
stream = lsquic_hashelem_getdata(el);
|
||||
if (!lsquic_stream_is_critical(stream))
|
||||
lsquic_stream_reset(stream, 0);
|
||||
lsquic_stream_maybe_reset(stream, 0, 1);
|
||||
}
|
||||
conn->fc_flags |= FC_CLOSING;
|
||||
if (!(conn->fc_flags & FC_GOAWAY_SENT))
|
||||
|
@ -3933,7 +3933,7 @@ headers_stream_on_stream_error (void *ctx, lsquic_stream_id_t stream_id)
|
|||
* errors. There does not seem to be a good reason to figure out
|
||||
* and send more specific error codes.
|
||||
*/
|
||||
lsquic_stream_reset_ext(stream, 1, 0);
|
||||
lsquic_stream_maybe_reset(stream, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2581,8 +2581,11 @@ generate_rst_stream_frame (struct ietf_full_conn *conn,
|
|||
lsquic_send_ctl_incr_pack_sz(&conn->ifc_send_ctl, packet_out, sz);
|
||||
packet_out->po_frame_types |= 1 << QUIC_FRAME_RST_STREAM;
|
||||
lsquic_stream_rst_frame_sent(stream);
|
||||
LSQ_DEBUG("wrote RST: stream %"PRIu64"; offset 0x%"PRIX64"; error code "
|
||||
LSQ_DEBUG("wrote RST: stream %"PRIu64"; offset %"PRIu64"; error code "
|
||||
"%"PRIu64, stream->id, stream->tosend_off, stream->error_code);
|
||||
EV_LOG_CONN_EVENT(LSQUIC_LOG_CONN_ID, "generated RESET_STREAM: stream "
|
||||
"%"PRIu64"; offset %"PRIu64"; error code %"PRIu64, stream->id,
|
||||
stream->tosend_off, stream->error_code);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -2919,7 +2922,7 @@ ietf_full_conn_ci_close (struct lsquic_conn *lconn)
|
|||
stream = lsquic_hashelem_getdata(el);
|
||||
sd = (stream->id >> SD_SHIFT) & 1;
|
||||
if (SD_BIDI == sd)
|
||||
lsquic_stream_reset(stream, 0);
|
||||
lsquic_stream_maybe_reset(stream, 0, 1);
|
||||
}
|
||||
conn->ifc_flags |= IFC_CLOSING;
|
||||
conn->ifc_send_flags |= SF_SEND_CONN_CLOSE;
|
||||
|
|
|
@ -144,6 +144,9 @@ stream_readable_http_ietf (struct lsquic_stream *stream);
|
|||
static ssize_t
|
||||
stream_write_buf (struct lsquic_stream *stream, const void *buf, size_t sz);
|
||||
|
||||
static void
|
||||
stream_reset (struct lsquic_stream *, uint64_t error_code, int do_close);
|
||||
|
||||
static size_t
|
||||
active_hq_frame_sizes (const struct lsquic_stream *);
|
||||
|
||||
|
@ -1284,7 +1287,7 @@ lsquic_stream_rst_in (lsquic_stream_t *stream, uint64_t offset,
|
|||
(STREAM_RST_SENT|STREAM_SS_SENT|STREAM_FIN_SENT))
|
||||
&& !(stream->sm_bflags & SMBF_IETF)
|
||||
&& !(stream->sm_qflags & SMQF_SEND_RST))
|
||||
lsquic_stream_reset_ext(stream, 7 /* QUIC_RST_ACKNOWLEDGEMENT */, 0);
|
||||
stream_reset(stream, 7 /* QUIC_RST_ACKNOWLEDGEMENT */, 0);
|
||||
|
||||
stream->stream_flags |= STREAM_RST_RECVD;
|
||||
|
||||
|
@ -1324,7 +1327,7 @@ lsquic_stream_stop_sending_in (struct lsquic_stream *stream,
|
|||
|
||||
if (!(stream->stream_flags & (STREAM_RST_SENT|STREAM_FIN_SENT))
|
||||
&& !(stream->sm_qflags & SMQF_SEND_RST))
|
||||
lsquic_stream_reset_ext(stream, 0, 0);
|
||||
stream_reset(stream, 0, 0);
|
||||
|
||||
maybe_finish_stream(stream);
|
||||
maybe_schedule_call_on_close(stream);
|
||||
|
@ -1767,7 +1770,7 @@ handle_early_read_shutdown_gquic (struct lsquic_stream *stream)
|
|||
{
|
||||
if (!(stream->stream_flags & STREAM_RST_SENT))
|
||||
{
|
||||
lsquic_stream_reset_ext(stream, 7 /* QUIC_STREAM_CANCELLED */, 0);
|
||||
stream_reset(stream, 7 /* QUIC_STREAM_CANCELLED */, 0);
|
||||
stream->sm_qflags |= SMQF_WAIT_FIN_OFF;
|
||||
}
|
||||
}
|
||||
|
@ -1848,7 +1851,7 @@ stream_shutdown_write (lsquic_stream_t *stream)
|
|||
&& !(stream->stream_flags & STREAM_HEADERS_SENT))
|
||||
{
|
||||
LSQ_DEBUG("headers not sent, send a reset");
|
||||
lsquic_stream_reset(stream, 0);
|
||||
stream_reset(stream, 0, 1);
|
||||
}
|
||||
else if (stream->sm_n_buffered == 0)
|
||||
{
|
||||
|
@ -4244,15 +4247,22 @@ lsquic_stream_set_max_send_off (lsquic_stream_t *stream, uint64_t offset)
|
|||
|
||||
|
||||
void
|
||||
lsquic_stream_reset (lsquic_stream_t *stream, uint64_t error_code)
|
||||
lsquic_stream_maybe_reset (struct lsquic_stream *stream, uint64_t error_code,
|
||||
int do_close)
|
||||
{
|
||||
lsquic_stream_reset_ext(stream, error_code, 1);
|
||||
if (!((stream->stream_flags
|
||||
& (STREAM_RST_SENT|STREAM_FIN_SENT|STREAM_U_WRITE_DONE))
|
||||
|| (stream->sm_qflags & SMQF_SEND_RST)))
|
||||
{
|
||||
stream_reset(stream, error_code, do_close);
|
||||
}
|
||||
else if (do_close)
|
||||
stream_shutdown_read(stream);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
lsquic_stream_reset_ext (lsquic_stream_t *stream, uint64_t error_code,
|
||||
int do_close)
|
||||
static void
|
||||
stream_reset (struct lsquic_stream *stream, uint64_t error_code, int do_close)
|
||||
{
|
||||
if ((stream->stream_flags & STREAM_RST_SENT)
|
||||
|| (stream->sm_qflags & SMQF_SEND_RST))
|
||||
|
@ -4599,7 +4609,7 @@ lsquic_stream_refuse_push (lsquic_stream_t *stream)
|
|||
&& !(stream->stream_flags & STREAM_RST_SENT))
|
||||
{
|
||||
LSQ_DEBUG("refusing pushed stream: send reset");
|
||||
lsquic_stream_reset_ext(stream, 8 /* QUIC_REFUSED_STREAM */, 1);
|
||||
stream_reset(stream, 8 /* QUIC_REFUSED_STREAM */, 1);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -510,10 +510,7 @@ void
|
|||
lsquic_stream_stream_frame_sent (lsquic_stream_t *);
|
||||
|
||||
void
|
||||
lsquic_stream_reset (lsquic_stream_t *, uint64_t error_code);
|
||||
|
||||
void
|
||||
lsquic_stream_reset_ext (lsquic_stream_t *, uint64_t error_code, int close);
|
||||
lsquic_stream_maybe_reset (struct lsquic_stream *, uint64_t error_code, int);
|
||||
|
||||
void
|
||||
lsquic_stream_call_on_close (lsquic_stream_t *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue