commit 4ce4f3a5c9d1258666ec1e2780200c44671c14b9 parent 9b1c0b5c5846a9cdef961d17a70b0b2685e16209 Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev> Date: Mon, 8 Dec 2025 21:38:36 +0100 H2: handle socket error when connection is already closing Diffstat:
| M | src/mhd2/h2/h2_comm.c | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mhd2/h2/h2_comm.c b/src/mhd2/h2/h2_comm.c @@ -584,7 +584,8 @@ mhd_h2_conn_process_data (struct MHD_Connection *restrict c) if (mhd_HTTP_LAYER_CLOSING == c->h_layer.state) { - if (c->write_buffer_append_offset == c->write_buffer_send_offset) + if ((c->write_buffer_append_offset == c->write_buffer_send_offset) + || (mhd_SOCKET_ERR_NO_ERROR != c->sk.state.discnt_err)) { mhd_h2_conn_h2_deinit_start_closing (c); return false;