fix broken listen socket piggybacking
authorAndy Green <andy.green@linaro.org>
Sun, 10 Feb 2013 01:06:38 +0000 (09:06 +0800)
committerAndy Green <andy.green@linaro.org>
Sun, 10 Feb 2013 01:06:38 +0000 (09:06 +0800)
commit9e4c917c274f8049d2b13d52a3de7df629d28255
tree21ea261e91c640127f2cb48978a792e470f67680
parenta690cd066ec7b1673437ed3a330d4a29a76e94af
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