Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tcp: break the tcp_read_timeout() loop at shutdown
  • Loading branch information
perexg committed Aug 8, 2014
1 parent c1166d7 commit 46b261f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tcp.c
Expand Up @@ -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;
Expand Down

0 comments on commit 46b261f

Please sign in to comment.