mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-24 05:03:17 -05:00
Better logging for broken connections while streaming
This commit is contained in:
parent
2193e14c98
commit
e0ff0c794e
@ -250,12 +250,16 @@ int readwrite(int fromfd, int tofd) {
|
||||
char buf[BLKSIZE];
|
||||
int bytesread;
|
||||
|
||||
if ((bytesread = r_read(fromfd, buf, BLKSIZE)) < 0)
|
||||
if ((bytesread = r_read(fromfd, buf, BLKSIZE)) < 0) {
|
||||
DPRINTF(E_WARN,L_MISC,"Read error: %s\n",strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
if (bytesread == 0)
|
||||
return 0;
|
||||
if (r_write(tofd, buf, bytesread) < 0)
|
||||
if (r_write(tofd, buf, bytesread) < 0) {
|
||||
DPRINTF(E_WARN,L_MISC,"Write error: %s\n",strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
return bytesread;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user