diff --git a/webu.c b/webu.c index 3e0cae2b..72d52779 100644 --- a/webu.c +++ b/webu.c @@ -1297,9 +1297,6 @@ static int webu_answer_strm(void *cls return MHD_YES; } - /* Do not answer a request until the motion loop has completed at least once */ - if (webui->cnt->passflag == 0) return MHD_NO; - if (strcmp (method, "GET") != 0){ MOTION_LOG(NTC, TYPE_STREAM, NO_ERRNO ,_("Invalid Method requested: %s"),method); return MHD_NO; @@ -1316,6 +1313,9 @@ static int webu_answer_strm(void *cls return retcd; } + /* Do not answer a request until the motion loop has completed at least once */ + if (webui->cnt->passflag == 0) return MHD_NO; + if (webui->cnt->webcontrol_finish) return MHD_NO; if (strlen(webui->clientip) == 0){