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.
This commit is contained in:
parent
d3b15f8fda
commit
b7f435b50e
1
NEWS
1
NEWS
@ -10,6 +10,7 @@ ver 0.16.4 (2011/??/??)
|
|||||||
- vorbis: don't send end-of-stream on flush
|
- vorbis: don't send end-of-stream on flush
|
||||||
* output:
|
* output:
|
||||||
- alsa: fix SIGFPE when alsa announces a period size of 0
|
- alsa: fix SIGFPE when alsa announces a period size of 0
|
||||||
|
- httpd: don't warn on client disconnect
|
||||||
|
|
||||||
|
|
||||||
ver 0.16.3 (2011/06/04)
|
ver 0.16.3 (2011/06/04)
|
||||||
|
@ -370,7 +370,14 @@ httpd_client_read(struct httpd_client *client)
|
|||||||
if (client->state == RESPONSE) {
|
if (client->state == RESPONSE) {
|
||||||
/* the client has already sent the request, and he
|
/* the client has already sent the request, and he
|
||||||
must not send more */
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user