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

NULL protocol: make sure vhost same protocol linklist gets correct protocol index

This commit is contained in:
Andy Green 2017-05-31 09:45:28 +08:00
parent ce2e74e5e3
commit a4f88d543e

View file

@ -1447,7 +1447,7 @@ upgrade_ws:
*/
lwsl_info("defaulting to prot handler %d\n",
wsi->vhost->default_protocol_index);
n = 0;
n = wsi->vhost->default_protocol_index;
wsi->protocol = &wsi->vhost->protocols[
(int)wsi->vhost->default_protocol_index];
}