From 0b57a3379460eeae61e8265fa573ccffb697c5f9 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 18 Jan 2003 12:30:29 +0000 Subject: [PATCH] Fix for a couple of nasty bugs that could result in clients being incorrectly dropped under some circumstances. Thanks to Ricardo Galli for finding this. svn path=/trunk/icecast/; revision=4268 --- src/format.c | 2 +- src/format_mp3.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/format.c b/src/format.c index 0ad1a060..1ce5238e 100644 --- a/src/format.c +++ b/src/format.c @@ -79,7 +79,7 @@ int format_generic_write_buf_to_client(format_plugin_t *format, ret = sock_write_bytes(client->con->sock, buf, len); if(ret < 0) { - if(sock_recoverable(ret)) { + if(sock_recoverable(sock_error())) { DEBUG1("Client had recoverable error %ld", ret); ret = 0; } diff --git a/src/format_mp3.c b/src/format_mp3.c index 2a39a321..366c5cc3 100644 --- a/src/format_mp3.c +++ b/src/format_mp3.c @@ -173,7 +173,7 @@ static int format_mp3_write_buf_to_client(format_plugin_t *self, } if(ret < 0) { - if(sock_recoverable(ret)) { + if(sock_recoverable(sock_error())) { DEBUG1("Client had recoverable error %ld", ret); ret = 0; }