From ac6a582254607fece0dc1957832d6934a06f8943 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 23 Dec 2020 14:59:00 +0000 Subject: [PATCH] protocol_init: ensure its happening without client --- lib/core-net/service.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/core-net/service.c b/lib/core-net/service.c index 293127ea7..3b37d58b8 100644 --- a/lib/core-net/service.c +++ b/lib/core-net/service.c @@ -304,6 +304,10 @@ lws_service_adjust_timeout(struct lws_context *context, int timeout_ms, int tsi) if (!context) return 1; + if (!context->protocol_init_done) + if (lws_protocol_init(context)) + return 1; + #if defined(LWS_WITH_SYS_SMD) if (!tsi && lws_smd_message_pending(context)) { lws_smd_msg_distribute(context);