1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00

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
This commit is contained in:
Jose Luis Millan 2015-03-28 10:20:50 +08:00 committed by Andy Green
parent 8ec7802935
commit 45a04b6240

View file

@ -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;