MINOR: muxes: Note that we can't usee a connection when added to the srv idle.

In the various muxes, add a comment documenting that once
srv_add_to_idle_list() got called, any thread may pick that conenction up,
so it is unsafe to access the mux context/the connection, the only thing we
can do is returning.
This commit is contained in:
Olivier Houchard 2020-03-22 23:25:51 +01:00
parent dbda31939d
commit 199d4fade4
3 changed files with 12 additions and 0 deletions

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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;