tcp: break the tcp_read_timeout() loop at shutdown

This commit is contained in:
Jaroslav Kysela 2014-08-08 18:55:47 +02:00
parent c1166d75c8
commit 46b261f687

View file

@ -321,6 +321,8 @@ tcp_read_timeout(int fd, void *buf, size_t len, int timeout)
if(x == 0)
return ETIMEDOUT;
if(x == -1) {
if (!tvheadend_running)
return ECONNRESET;
if (ERRNO_AGAIN(errno))
continue;
return errno;