Apache Lucene open-source search software
SOLR-11740: fix stop port variable scope issue in stop_solr function (SOLR-9137 follow-on)
Christine Poerschke7974aa033c79
diff --git a/solr/bin/solr b/solr/bin/solrindex 2fb483c826f..f9814c26828 100755--- a/solr/bin/solr+++ b/solr/bin/solr@@ -729,13 +729,13 @@ function stop_solr() {DIR="$1"SOLR_PORT="$2"- STOP_PORT="${STOP_PORT:-$(expr $SOLR_PORT - 1000)}"+ THIS_STOP_PORT="${STOP_PORT:-$(expr $SOLR_PORT - 1000)}"STOP_KEY="$3"SOLR_PID="$4"if [ "$SOLR_PID" != "" ]; thenecho -e "Sending stop command to Solr running on port $SOLR_PORT ... waiting up to $SOLR_STOP_WAIT seconds to allow Jetty process $SOLR_PID to stop gracefully."- "$JAVA" $SOLR_SSL_OPTS $AUTHC_OPTS -jar "$DIR/start.jar" "STOP.PORT=$STOP_PORT" "STOP.KEY=$STOP_KEY" --stop || true+ "$JAVA" $SOLR_SSL_OPTS $AUTHC_OPTS -jar "$DIR/start.jar" "STOP.PORT=$THIS_STOP_PORT" "STOP.KEY=$STOP_KEY" --stop || true(loops=0while truedo