phd->status = HTTP_SENT_GET_REQUEST;
return;
}
- if (!FD_ISSET(phd->fd, &s->rfds))
- return;
if (phd->status == HTTP_SENT_GET_REQUEST) {
- ret = recv_pattern(phd->fd, HTTP_OK_MSG, strlen(HTTP_OK_MSG));
+ ret = read_pattern(phd->fd, HTTP_OK_MSG, strlen(HTTP_OK_MSG), &s->rfds);
if (ret < 0)
goto err;
+ if (ret == 0)
+ return;
PARA_INFO_LOG("received ok msg, streaming\n");
phd->status = HTTP_STREAMING;
return;