Regain WIFI connectivity I wrote a code to be implemented in a SONOFF device (ESP8266 chip).
My question is regarding disconnection due to failure/ power fail in wifi network - when such event happens, does wifi connectivity try to reconnect or to over come this possibility - should I enter  inside void loop () to verify wifi connectivity ?  

#include &lt;ESP8266WiFi.h&gt;
#include &lt;PubSubClient.h&gt;


// GPIOs on SONOFF board
int LED_SONOFF = 13;
int REL_SONOFF = 12;
int PIN_SW = 14;

const char* ssid = "Home";
const char* password = "12345678";
const char* mqtt_server = "192.168.2.113";
int last_sw_state = 0;

WiFiClient espClient;
PubSubClient client(espClient);


char msg[50];
const char* clientID = "Sonoff";
char *client_temp = "HomePi/Dvir/Windows/";
const char* outTopic = "HomePi/Dvir/Messages";
const char* outTopic2 = "HomePi/Dvir/Windows/ESP32";
const char* inTopic [strlen(client_temp) + 3];
const char* inTopic2 = "HomePi/Dvir/Windows/All";

String clock;

void start_wifi() {
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("");
  Serial.println("WiFi connected");  
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());

  for (int i=0; i&lt;3; i++){
    digitalWrite(LED_SONOFF,LOW);
    delay(50); 
    digitalWrite(LED_SONOFF,HIGH);
    delay(50); 
  }
}
My question is regarding disconnection due to failure/ power fail in
  wifi network - when such event happens, does wifi connectivity try to
  reconnect or to over come this possibility


use WiFi.setAutoReconnect(true); when initializing WiFi

other useful option is WiFi.setAutoConnect(). It controls if the esp8266 next time starts the WiFi connection with remembered setting, before your sketch starts.