mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
adopt: disable ssl flags if ssl not enabled
https://github.com/warmcat/libwebsockets/issues/2011
This commit is contained in:
parent
2330f69082
commit
8584c973fa
1 changed files with 4 additions and 0 deletions
|
@ -163,6 +163,10 @@ lws_adopt_descriptor_vhost1(struct lws_vhost *vh, lws_adoption_type type,
|
|||
}
|
||||
}
|
||||
|
||||
if (!LWS_SSL_ENABLED(new_wsi->a.vhost) ||
|
||||
!(type & LWS_ADOPT_SOCKET))
|
||||
type &= ~LWS_ADOPT_ALLOW_SSL;
|
||||
|
||||
if (lws_role_call_adoption_bind(new_wsi, type, vh_prot_name)) {
|
||||
lwsl_err("%s: no role for desc type 0x%x\n", __func__, type);
|
||||
goto bail;
|
||||
|
|
Loading…
Add table
Reference in a new issue