Http download issue when connection lost (#723)

* Fix bug when read returns -1

When the socket down the "read" function returns -1.
Then the while(read_byte > 0) only works for signed types.

* Remove printf debug line
This commit is contained in:
Júnio Teixeira 2019-06-23 03:22:59 -03:00 committed by Johan Kanflo
parent 8f378b41c8
commit d02b40dce8

View file

@ -110,7 +110,8 @@ static inline void parse_http_header(char *header)
HTTP_Client_State HttpClient_dowload(Http_client_info *info)
{
struct addrinfo *res;
unsigned int tot_http_pdu_rd, read_byte, full;
unsigned int tot_http_pdu_rd, full;
ssize_t read_byte;
int err, sock;
char *wrt_ptr;