test server: use the protocol error handling
test server: use the protocol error handling

Use wth_object_post_error() to send all protocol errors and add a proper
sender for OOM errors too.

connection_handle_data() now ignores EPROTO errors from
wth_connection_dispatch() as recommended in wth_connection
documentation.

client_destroy() no longer calls flush, because cloding the fd
immediately after will likely discard any unsent messages anyway.
The new protocol error handling should instead keep the connection open
until the error has been delivered.

Signed-off-by: Pekka Paalanen <0f6ae7001e34c37b02fb2c1c2573ddf8f442136a@collabora.co.uk>

waltham/waltham,waltham/waltham