fix lws_lookup off by one

Signed-off-by: nononame <nononame@le-huit.fr>
This commit is contained in:
nononame 2014-01-11 13:12:34 +08:00 committed by Andy Green
parent ed451d5cbf
commit f162492cf3

View file

@ -119,7 +119,7 @@ insert_wsi_socket_into_fds(struct libwebsocket_context *context,
return 1;
}
if (wsi->sock > context->max_fds) {
if (wsi->sock >= context->max_fds) {
lwsl_err("Socket fd %d is too high (%d)\n",
wsi->sock, context->max_fds);
return 1;