Arduino Uno WiFi Rev2 hangs if WiFi connection disrupted

I tested the example and after it was running I blacklisted the device on my router, thereby disconnecting it. Once I removed the blacklist entry the Arduino did not re-establish a connection to the router. This is exactly what should happen based on the example code. Please notice that the connection to the router is currently done in the setup method, this method only runs on boot (or reset). When the network connection is broken you will continually receive the "connection failed" message on the serial monitor because the program cannot reestablish it based on how it is written. You would want to call the code that creates the connection ( I would pull the code out of the setup method, put it in it's own method (see below) and call the new method from setup (in place of the existing code) as well as when you receive the "connection failed" error on line 108 of the example.

void createConnection() {

// This new line is required to disconnect the previous connection otherwise
// it will try to use the old connection and never reconnect if the connection fails
status=WiFi.disconnect();

// attempt to connect to Wifi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
status = WiFi.begin(ssid, pass);

// wait 10 seconds for connection:
delay(10000);
}
// you're connected now, so print out the status:
printWifiStatus();

}