diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index 993e02cca..b7afde1b8 100644 --- a/src/mux_fcgi.c +++ b/src/mux_fcgi.c @@ -3558,6 +3558,10 @@ static void fcgi_detach(struct conn_stream *cs) TRACE_DEVEL("outgoing connection killed", FCGI_EV_STRM_END|FCGI_EV_FCONN_ERR); return; } + /* At this point, the connection has been added to the + * server idle list, so another thread may already have + * hijacked it, so we can't do anything with it. + */ TRACE_DEVEL("reusable idle connection", FCGI_EV_STRM_END, fconn->conn); return; } diff --git a/src/mux_h1.c b/src/mux_h1.c index fee645b19..27b1cb674 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -2473,6 +2473,10 @@ static void h1_detach(struct conn_stream *cs) TRACE_DEVEL("outgoing connection killed", H1_EV_STRM_END|H1_EV_H1C_END); goto end; } + /* At this point, the connection has been added to the + * server idle list, so another thread may already have + * hijacked it, so we can't do anything with it. + */ return; } } diff --git a/src/mux_h2.c b/src/mux_h2.c index d10c525c9..6b1c0d118 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -3959,6 +3959,10 @@ static void h2_detach(struct conn_stream *cs) TRACE_DEVEL("leaving on error after killing outgoing connection", H2_EV_STRM_END|H2_EV_H2C_ERR); return; } + /* At this point, the connection has been added to the + * server idle list, so another thread may already have + * hijacked it, so we can't do anything with it. + */ TRACE_DEVEL("reusable idle connection", H2_EV_STRM_END); return;