Skip to content

Commit bfee718

Browse files
committed
HTTPSCLIENT: Limit httpsclient_open connect retry to 200 attempts
1 parent a019efc commit bfee718

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/httpsclient/httpsclient.scm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ static int httpsclient_open(char *host, int port, int use_keys, char *cert, char
106106
struct pollfd tmp;
107107
tmp.fd = s;
108108
tmp.events = POLLOUT;
109-
while (poll(&tmp,1,-1) == -1 ) {
109+
int maxretry_ct=200;
110+
while (maxretry_ct>0 && poll(&tmp,1,-1) == -1) {
111+
maxretry_ct--;
110112
if (errno==EINTR) continue;
111113
return 0;
112114
}

0 commit comments

Comments
 (0)