- ret = recv_bin_buffer(phd->fd, buf, sz);
- if (ret == 0)
- ret = -E_RECV_EOF;
- if (ret < 0)
- goto err;
- btr_add_output_pool(phd->btrp, ret, btrn);
- return;
+ ret = read_nonblock(phd->fd, buf, sz, &s->rfds, &n);
+ if (n > 0)
+ btr_add_output_pool(phd->btrp, n, btrn);
+ if (ret >= 0)
+ return;