http_recv: set the eof flag on buffer overruns.
[paraslash.git] / http_recv.c
index a681a00..264ae2c 100644 (file)
@@ -142,8 +142,10 @@ static void http_recv_post_select(struct sched *s, struct task *t)
        }
        t->ret = -E_OVERRUN;
        /* already streaming */
-       if (rn->loaded >= BUFSIZE)
+       if (rn->loaded >= BUFSIZE) {
+               rn->eof = 1;
                return;
+       }
        t->ret = recv_bin_buffer(phd->fd, rn->buf + rn->loaded,
                BUFSIZE - rn->loaded);
        if (t->ret <= 0) {