diff --git a/lib/server.c b/lib/server.c index 7354d52f..d8f00c2e 100644 --- a/lib/server.c +++ b/lib/server.c @@ -597,6 +597,10 @@ libwebsocket_create_new_server_wsi(struct libwebsocket_context *context) new_wsi->mode = LWS_CONNMODE_HTTP_SERVING; new_wsi->hdr_parsing_completed = 0; +#ifdef LWS_OPENSSL_SUPPORT + new_wsi->use_ssl = LWS_SSL_ENABLED(context); +#endif + if (lws_allocate_header_table(new_wsi)) { lws_free(new_wsi); return NULL;