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; }