The "shutdown sessions" admin-mode command used to open-code the list
traversal while there's already a function for this: srv_shutdown_streams().
Better use it.
break;
case ST_ADM_ACTION_SHUTDOWN:
if (px->state != PR_STSTOPPED) {
- struct stream *sess, *sess_bck;
-
- list_for_each_entry_safe(sess, sess_bck, &sv->actconns, by_srv)
- if (sess->srv_conn == sv)
- stream_shutdown(sess, SF_ERR_KILLED);
-
+ srv_shutdown_streams(sv, SF_ERR_KILLED);
altered_servers++;
total_servers++;
}