mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-18 20:03:47 +00:00
Add 5 seconds read timeout to RSocket.http_get()
This commit is contained in:
parent
1ee9f99b3b
commit
2ebab53fc5
@ -8,6 +8,7 @@ static char *r_socket_http_answer (RSocket *s, int *code, int *rlen) {
|
||||
int ret, olen, len = 0, bufsz = 32768, delta = 0;
|
||||
char *dn, *res, *buf = malloc (bufsz); // XXX: use r_buffer here
|
||||
|
||||
r_socket_block_time (s, 1, 5);
|
||||
res = NULL;
|
||||
olen = r_socket_read_block (s, (unsigned char*) buf, bufsz);
|
||||
if (olen < 1) goto fail;
|
||||
|
Loading…
x
Reference in New Issue
Block a user