Fixed a problem where if the WiFi signal drops, it was not possible to re-establish a connection, as the DatagramSocket hadn't been properly closed like it is when the Close button is pressed.