From 45a04b624076f36524c47a749ca9c661f99f9466 Mon Sep 17 00:00:00 2001 From: Jose Luis Millan Date: Sat, 28 Mar 2015 10:20:50 +0800 Subject: [PATCH] set server listening wsi use_ssl status If the server option to allow non-ssl is enabled, it will force this cleared when it sees that has happened --- lib/server.c | 4 ++++ 1 file changed, 4 insertions(+) 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;