aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-08-23 17:51:28 +0200
committerMax Kellermann <max@duempel.org>2011-08-23 18:02:56 +0200
commitb7f435b50e591ca2c485e13c06c426b64ecd4090 (patch)
treec93e7fa3191dc0f32c8b919dbf57b80d42c8e5bc /src
parentd3b15f8fda6ae8baa5e02badbb36b424862aee61 (diff)
downloadmpd-b7f435b50e591ca2c485e13c06c426b64ecd4090.tar.gz
mpd-b7f435b50e591ca2c485e13c06c426b64ecd4090.tar.xz
mpd-b7f435b50e591ca2c485e13c06c426b64ecd4090.zip
output/httpd: don't warn on client disconnect
This warning should only be logged when we really received something. When the client disconnects, G_IO_IN is triggered, and the read returns G_IO_STATUS_EOF.
Diffstat (limited to '')
-rw-r--r--src/output/httpd_client.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/output/httpd_client.c b/src/output/httpd_client.c
index f5e14925b..df2f2a9e6 100644
--- a/src/output/httpd_client.c
+++ b/src/output/httpd_client.c
@@ -370,7 +370,14 @@ httpd_client_read(struct httpd_client *client)
if (client->state == RESPONSE) {
/* the client has already sent the request, and he
must not send more */
- g_warning("unexpected input from client");
+ char buffer[1];
+
+ status = g_io_channel_read_chars(client->channel, buffer,
+ sizeof(buffer), &bytes_read,
+ NULL);
+ if (status == G_IO_STATUS_NORMAL)
+ g_warning("unexpected input from client");
+
return false;
}