test server kill skt with minus 1
authorAndy Green <andy.green@linaro.org>
Sun, 17 Feb 2013 01:14:08 +0000 (09:14 +0800)
committerAndy Green <andy.green@linaro.org>
Sun, 17 Feb 2013 01:14:08 +0000 (09:14 +0800)
commit51b20ee92ab96dfc4a231e57bc4e631f06183bef
tree1b76e5ce24499872a75f60a8b6c22ef6c1e6ba79
parentc9ac31ee1c48ebb22349a077a4a6ac3298208f85
test server kill skt with minus 1

The client spams the server with mirror protocol content
and then closes the connection.  However the server wants to
send that content back to all the mirror protocol
connections, including the one that closed.

The result is during the send back phase we usually see an
error trying to send to the close client connection. Because
we don't return -1, we don't close it on server side and the
error repeats a lot before finally closing.  This is a side-
effect of a recent patch to drain pending input before
really closing a dead connection.

This patch just changes it to return -1 on the failed send
attempt assertively closing the connection.

Signed-off-by: Andy Green <andy.green@linaro.org>
test-server/test-server.c