tcp: break the tcp_read_timeout() loop at shutdown
This commit is contained in:
parent
c1166d75c8
commit
46b261f687
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue