mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
fix spinning on NULL protocol name
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
62824f96d4
commit
afa10d5a89
1 changed files with 3 additions and 1 deletions
|
@ -389,8 +389,10 @@ int lws_handshake_server(struct libwebsocket_context *context,
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
while (context->protocols[n].callback) {
|
while (context->protocols[n].callback) {
|
||||||
if (!wsi->protocol->name)
|
if (!wsi->protocol->name) {
|
||||||
|
n++;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
if (!strcmp(context->protocols[n].name,
|
if (!strcmp(context->protocols[n].name,
|
||||||
protocol_name)) {
|
protocol_name)) {
|
||||||
lwsl_info("prot match %d\n", n);
|
lwsl_info("prot match %d\n", n);
|
||||||
|
|
Loading…
Add table
Reference in a new issue