fix spinning on NULL protocol name

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2014-08-11 09:11:57 +08:00
parent 62824f96d4
commit afa10d5a89

View file

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