If you click the Join button to join a server on localhost, and there isn't a server currently open on localhost, the game incorrectly believes that you entered a server. You receive the "Joined server" message, and you can do things as normal, but, the networking interface changes to show the "Disconnect" button, and clicking it does nothing. So in practice, you're stuck in this nonexistent server until you restart the game.
If you click the Join button to join a server on localhost, and there isn't a server currently open on localhost, the game incorrectly believes that you entered a server. You receive the "Joined server" message, and you can do things as normal, but, the networking interface changes to show the "Disconnect" button, and clicking it does nothing. So in practice, you're stuck in this nonexistent server until you restart the game.