diff options
| author | 2023-01-24 15:06:58 +0100 | |
|---|---|---|
| committer | 2023-01-24 15:06:58 +0100 | |
| commit | fd1e281cbae03ced989631abd400062af81c48c2 (patch) | |
| tree | 6ad8e8fca29c57af3ece6b470868df6c8607fb76 /http.c | |
| parent | Backport from xs. (diff) | |
| download | snac2-fd1e281cbae03ced989631abd400062af81c48c2.tar.gz snac2-fd1e281cbae03ced989631abd400062af81c48c2.tar.xz snac2-fd1e281cbae03ced989631abd400062af81c48c2.zip | |
Use a shorter timeout for first output connections.
Diffstat (limited to '')
| -rw-r--r-- | http.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -14,7 +14,8 @@ | |||
| 14 | d_char *http_signed_request(snac *snac, char *method, char *url, | 14 | d_char *http_signed_request(snac *snac, char *method, char *url, |
| 15 | d_char *headers, | 15 | d_char *headers, |
| 16 | d_char *body, int b_size, | 16 | d_char *body, int b_size, |
| 17 | int *status, d_char **payload, int *p_size) | 17 | int *status, d_char **payload, int *p_size, |
| 18 | int timeout) | ||
| 18 | /* does a signed HTTP request */ | 19 | /* does a signed HTTP request */ |
| 19 | { | 20 | { |
| 20 | xs *l1; | 21 | xs *l1; |
| @@ -95,7 +96,7 @@ d_char *http_signed_request(snac *snac, char *method, char *url, | |||
| 95 | hdrs = xs_dict_append(hdrs, "user-agent", USER_AGENT); | 96 | hdrs = xs_dict_append(hdrs, "user-agent", USER_AGENT); |
| 96 | 97 | ||
| 97 | response = xs_http_request(method, url, hdrs, | 98 | response = xs_http_request(method, url, hdrs, |
| 98 | body, b_size, status, payload, p_size); | 99 | body, b_size, status, payload, p_size, timeout); |
| 99 | 100 | ||
| 100 | srv_archive("SEND", hdrs, body, b_size, *status, response, *payload, *p_size); | 101 | srv_archive("SEND", hdrs, body, b_size, *status, response, *payload, *p_size); |
| 101 | 102 | ||