close connection if socket recv() fails.
authorNick Dowell <nick@nickdowell.com>
Thu, 5 Apr 2012 02:29:39 +0000 (10:29 +0800)
committerAndy Green <andy.green@linaro.org>
Thu, 5 Apr 2012 02:29:39 +0000 (10:29 +0800)
commitc04c193dc36c674bd5eec13af8b5c821367c0d08
tree8c6c26b31cbeace2ea8e9cb8e5fe47389163001f
parentf803c0d9df4aa7a686cc330ca36f07c1aa97c5dd
close connection if socket recv() fails.

This prevents a problem observed on Windows whereby a client that
disconnects before fully establishing the WebSocket would cause the
server to use 100% CPU since recv() would continually return -1 for that
socket.

Signed-off-by: Nick Dowell <nick@nickdowell.com>
lib/libwebsockets.c