diff --git a/CHANGELOG b/CHANGELOG index 6c225dc0..cf663553 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2024-09-23 + - 4.0.12 + - Fix stream WANT_WRITE flag that causes busy looping. + 2024-09-09 - 4.0.11 - Fix assert failure related to splitting a large packet. diff --git a/docs/conf.py b/docs/conf.py index 030a7b3a..6e69af50 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ # The short X.Y version version = u'4.0' # The full version, including alpha/beta/rc tags -release = u'4.0.11' +release = u'4.0.12' # -- General configuration --------------------------------------------------- diff --git a/include/lsquic.h b/include/lsquic.h index bf2508e1..848e3a37 100644 --- a/include/lsquic.h +++ b/include/lsquic.h @@ -27,7 +27,7 @@ extern "C" { #define LSQUIC_MAJOR_VERSION 4 #define LSQUIC_MINOR_VERSION 0 -#define LSQUIC_PATCH_VERSION 11 +#define LSQUIC_PATCH_VERSION 12 /** * Engine flags: diff --git a/src/liblsquic/lsquic_stream.c b/src/liblsquic/lsquic_stream.c index fa052b0a..46c0d048 100644 --- a/src/liblsquic/lsquic_stream.c +++ b/src/liblsquic/lsquic_stream.c @@ -783,6 +783,8 @@ lsquic_stream_call_on_close (lsquic_stream_t *stream) stream->stream_flags |= STREAM_ONCLOSE_DONE; SM_HISTORY_APPEND(stream, SHE_ONCLOSE_CALL); stream->stream_if->on_close(stream, stream->st_ctx); + if (stream->sm_qflags & SMQF_WANT_WRITE) + maybe_remove_from_write_q(stream, SMQF_WANT_WRITE); } else assert(0); @@ -2064,6 +2066,7 @@ static void maybe_put_onto_write_q (lsquic_stream_t *stream, enum stream_q_flags flag) { assert(SMQF_WRITE_Q_FLAGS & flag); + assert(!(stream->stream_flags & STREAM_ONCLOSE_DONE)); if (!(stream->sm_qflags & SMQF_WRITE_Q_FLAGS)) { LSQ_DEBUG("put on write queue");