fix broken listen socket piggybacking 39/3039/1
authorAndy Green <andy.green@linaro.org>
Sun, 10 Feb 2013 01:06:38 +0000 (09:06 +0800)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 7 Mar 2013 21:01:32 +0000 (13:01 -0800)
commit5f86daede01c704c9de838729568607edbaa29d6
treeaa8fa567def1d69172fe7716fe17b80b4f3828bf
parent15e2f76809f450b922dd1e3986c6e2016cc5a700
fix broken listen socket piggybacking

As reported here

http://libwebsockets.org/trac/ticket/11

the code for connection storm handling had rotted, fds[0] is no longer
always related to the listen socket when serving.

This patch updates it to determine the listen socket correctly to stop
infinite recursion here.

Reported-by: amn
Signed-off-by: Andy Green <andy.green@linaro.org>
lib/libwebsockets.c