diff --git a/lib/formats/msg.cpp b/lib/formats/msg.cpp index 44d1f163d..4568440af 100644 --- a/lib/formats/msg.cpp +++ b/lib/formats/msg.cpp @@ -110,6 +110,8 @@ int msg_from_sample(struct msg *msg_in, struct sample *smp, struct vlist *signal { msg_in->type = MSG_TYPE_DATA; msg_in->version = MSG_VERSION; + msg_in->rsvd1 = 0; + msg_in->resv2 = 0; msg_in->length = (uint16_t) smp->length; msg_in->sequence = (uint32_t) smp->sequence; msg_in->ts.sec = smp->ts.origin.tv_sec; diff --git a/lib/hooks/stats.cpp b/lib/hooks/stats.cpp index b6bf63240..94696e402 100644 --- a/lib/hooks/stats.cpp +++ b/lib/hooks/stats.cpp @@ -232,12 +232,16 @@ public: virtual void prepare() { + assert(state == State::CHECKED); + stats = std::make_shared(buckets, warmup); /* Register statistic object to path. * * This allows the path code to update statistics. */ node->stats = stats; + + state = State::PREPARED; } }; diff --git a/lib/web.cpp b/lib/web.cpp index de2db734f..8b60c1484 100644 --- a/lib/web.cpp +++ b/lib/web.cpp @@ -170,7 +170,7 @@ void Web::worker() logger->info("Started worker"); while (running) { - lws_service(context, 100); + lws_service(context, 10); while (!writables.empty()) { wsi = writables.pop();