     } else {
       client.loop();
     }
+  } else {
+    if (client.connected())
+      client.disconnect();
   }
   static unsigned long tock = 0;
 

    else // U_SPIFFS
      type = "filesystem";

    // NOTE: if updating SPIFFS this would be the place to unmount SPIFFS using SPIFFS.end()
    Serial.println("Start updating " + type);
  });

  ArduinoOTA.onEnd([]() {
    Serial.println("\nEnd");
  });

  ArduinoOTA.onError([](ota_error_t error) {


PololuStepper stepper = PololuStepper(STEPPER_STEP, STEPPER_DIR, STEPPER_ENABLE);

const char mqtt_host[] = "space.vijn.org";
const unsigned short mqtt_port = 1883;

