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;
|
||||
while (context->protocols[n].callback) {
|
||||
if (!wsi->protocol->name)
|
||||
if (!wsi->protocol->name) {
|
||||
n++;
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(context->protocols[n].name,
|
||||
protocol_name)) {
|
||||
lwsl_info("prot match %d\n", n);
|
||||
|
|
Loading…
Add table
Reference in a new issue