If the http receiver is started when the stream is stopped or paused,
para_recv exits silently with no error message. Let's tell the user
what is going on.
}
if (phd->status == HTTP_SENT_GET_REQUEST) {
ret = read_pattern(rn->fd, HTTP_OK_MSG, strlen(HTTP_OK_MSG), &s->rfds);
- if (ret < 0)
+ if (ret < 0) {
+ PARA_ERROR_LOG("did not receive HTTP OK message\n");
goto out;
+ }
if (ret == 0)
return 0;
PARA_INFO_LOG("received ok msg, streaming\n");
btr_add_output_pool(rn->btrp, num_bytes - iov[0].iov_len, btrn);
}
out:
- if (ret < 0)
+ if (ret < 0) {
+ PARA_NOTICE_LOG("%s\n", para_strerror(-ret));
btr_remove_node(&rn->btrn);
+ }
return ret;
}