I am assuming you have two loops to allow the server to restart and listen again in case the connection is closed. Otherwise, the outer loop is pointless.
The answer is: race condition/dataflow. When you first run the loop the Stop button is read by the outer loop. It's False. The VI then sits in the
TCP Listen function. Once the connection is received you go inside the inner loop. It chugs along, and you decide to press the Stop button. This is read by the local variable, and causes the inner loop to stop.
This does not cause the outer loop to stop since the stop terminal for the outer loop has already received its value from when the loop was first run. Thus, it runs again. On this second run it reads the Stop button and this time it's True. However, since the VI is sitting in the TCP Listen it won't stop until the VI gets into the inner loop a second time and then gets out (which it will do after one iteration since the Stop button is True).
You need to place the Stop button terminal in the inner loop and tunnel out its value to the outer loop. Get rid of the local variable.