diff --git a/src/server.c b/src/server.c index da7eba34a..c0795c0a5 100644 --- a/src/server.c +++ b/src/server.c @@ -2015,9 +2015,7 @@ static int srv_has_streams(struct server *srv) * code in , which must be one of SF_ERR_* indicating the reason for the * shutdown. * - * Note: the function will switch to thread isolation (due to shutdown_stream() - * modifying the streams directly), and commonly called with the server's lock - * held as well though not needed anymore (this is not a bug). + * Must be called with the server lock held. */ void srv_shutdown_streams(struct server *srv, int why) { @@ -2025,14 +2023,10 @@ void srv_shutdown_streams(struct server *srv, int why) struct mt_list back; int thr; - thread_isolate(); - for (thr = 0; thr < global.nbthread; thr++) MT_LIST_FOR_EACH_ENTRY_LOCKED(stream, &srv->per_thr[thr].streams, by_srv, back) if (stream->srv_conn == srv) stream_shutdown(stream, why); - - thread_release(); } /* Shutdown all connections of all backup servers of a proxy. The caller must