diff --git a/src/main.cpp b/src/main.cpp
index 5ede7f9..2b9cee2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -423,6 +423,5 @@ void loop()
 {
   iotWebConf.doLoop();
 
-  if (camera_server)
-    camera_server->doLoop();
+  server.loop();
 }
\ No newline at end of file