LCD Display Refresh

Can someone save me some frustration and help me understand why the following code does not refresh the LCD properly? The Serial Monitor updates as expected; however, the LCD always displays "Connecting..." even though the LCD calls are in the same block as the Serial Monitor ones.

void wifiStatus(){
  delay(4500);
  long wifiStatus = WiFi.status();
  long wifiSignal = WiFi.RSSI();

  if (WiFi.status() != WL_CONNECTED) {
    Serial.println("WiFi connection is down, trying to connect..");
    lcd.setCursor(0, 0);
    lcd.clear();
    lcd.print("Connecting...");
    
    WiFi.disconnect();
    wifiConnect();
  
  } else {
    
    delay(500);
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("Status:");
    lcd.print(wifiStatus);
    lcd.setCursor(0, 1);
    lcd.print("Signal:");
    lcd.print(wifiSignal); 


    
    Serial.print("WiFi Status: ");
    Serial.print(wifiStatus);
    Serial.print(" Signal: ");
    Serial.print(wifiSignal);
    Serial.println(" dBm");
    
    }


   
}

The console correctly displays:

19:59:38.469 -> WiFi Status: 3 Signal: -79 dBm
19:59:43.570 -> WiFi Status: 3 Signal: -78 dBm
19:59:48.653 -> WiFi Status: 3 Signal: -79 dBm

No comments? Bummer...

Well, that code won't build an image so you can't upload it....... :wink:

We need to see the rest of the code.
Even better is a small sketch that builds and is uploadable that demonstrates the issue.

--- bill