Why I need to restart the editor in order to run the game as host by using FSocket?

It works~thank you.
I did not close the lisock when I shut down because it will crash if I do not connect to the game.
I modify my code and it can be closed without problem.